-
-
diff --git a/dash-frontend/assets/gui/tab/welcome_common.xml b/dash-frontend/assets/gui/tab/welcome_common.xml
index 97a8134c..58cb89fd 100644
--- a/dash-frontend/assets/gui/tab/welcome_common.xml
+++ b/dash-frontend/assets/gui/tab/welcome_common.xml
@@ -14,5 +14,5 @@
-
+
diff --git a/dash-frontend/assets/gui/tab/welcome_page_0.xml b/dash-frontend/assets/gui/tab/welcome_page_0.xml
index ae29c5d2..d5961ae6 100644
--- a/dash-frontend/assets/gui/tab/welcome_page_0.xml
+++ b/dash-frontend/assets/gui/tab/welcome_page_0.xml
@@ -9,5 +9,7 @@
+
+
diff --git a/dash-frontend/src/frontend.rs b/dash-frontend/src/frontend.rs
index 0b1f9bb0..4de9329c 100644
--- a/dash-frontend/src/frontend.rs
+++ b/dash-frontend/src/frontend.rs
@@ -5,12 +5,14 @@ use glam::Vec2;
use wgui::{
assets::{AssetPath, AssetProvider},
components::button::ComponentButton,
+ event::StyleSetRequest,
font_config::WguiFontConfig,
globals::WguiGlobals,
i18n::Translation,
- layout::{Layout, LayoutParams, LayoutUpdateParams, LayoutUpdateResult, WidgetID},
+ layout::{Layout, LayoutParams, LayoutTask, LayoutUpdateParams, LayoutUpdateResult, WidgetID},
parser::{Fetchable, ParseDocumentParams, ParserState},
renderer_vk::text::custom_glyph::CustomGlyphData,
+ taffy::{self},
task::Tasks,
theme::WguiTheme,
widget::{label::WidgetLabel, rectangle::WidgetRectangle, sprite::WidgetSprite},
@@ -392,6 +394,12 @@ impl
Frontend {
let widget_content = self.state.fetch_widget(&self.layout.state, "content")?;
self.layout.remove_children(widget_content.id);
+ let padding = tab_type.get_preferred_padding();
+ self.layout.tasks.push(LayoutTask::SetWidgetStyle(
+ widget_content.id,
+ StyleSetRequest::Padding(taffy::Rect::length(padding)),
+ ));
+
let (tab_translation, icon_path) = match tab_type {
TabType::Welcome => ("GETTING_STARTED", "dashboard/welcome.svg"),
TabType::Home => ("HOME_SCREEN", "dashboard/home.svg"),
diff --git a/dash-frontend/src/tab/mod.rs b/dash-frontend/src/tab/mod.rs
index 915019dc..9418c843 100644
--- a/dash-frontend/src/tab/mod.rs
+++ b/dash-frontend/src/tab/mod.rs
@@ -17,6 +17,15 @@ pub enum TabType {
Welcome,
}
+impl TabType {
+ pub fn get_preferred_padding(&self) -> f32 {
+ match self {
+ TabType::Welcome => 0.0,
+ _ => 16.0,
+ }
+ }
+}
+
pub trait Tab {
#[allow(dead_code)]
fn get_type(&self) -> TabType;