diff --git a/ui/object_tool_panel.slint b/ui/object_tool_panel.slint index 0c0c5b5..9c79a27 100644 --- a/ui/object_tool_panel.slint +++ b/ui/object_tool_panel.slint @@ -1,6 +1,6 @@ import { Metrics, DarkPalette } from "theme.slint"; import { Panel } from "widgets/panel.slint"; -import { HorizontalBox, VerticalBox } from "widgets/layout.slint"; +import { Box, HorizontalBox, VerticalBox } from "widgets/layout.slint"; export component ObjectToolPanel inherits VerticalBox { @@ -98,7 +98,7 @@ export component ObjectToolPanel inherits VerticalBox { text: @tr("Name:"); } - HorizontalBox { + Box { j-padding: 0px; Text { @@ -110,14 +110,14 @@ export component ObjectToolPanel inherits VerticalBox { } } - HorizontalBox { + Box { width: Metrics.size-md; j-elevation: 3; Rectangle { } } - HorizontalBox { + Box { width: Metrics.size-md; j-elevation: 3; @@ -125,7 +125,7 @@ export component ObjectToolPanel inherits VerticalBox { } } - VerticalBox { + Box { Text { color: DarkPalette.text[4]; font-size: Metrics.font-lg; diff --git a/ui/tool_bar.slint b/ui/tool_bar.slint index a842426..56e022f 100644 --- a/ui/tool_bar.slint +++ b/ui/tool_bar.slint @@ -1,13 +1,12 @@ import { Metrics, DarkPalette } from "theme.slint"; import { Button } from "std-widgets.slint"; import { HorizontalSeparator } from "widgets/separator.slint"; -import { VerticalBox } from "widgets/layout.slint"; +import { Box, VerticalBox } from "widgets/layout.slint"; -component ToolBarItem inherits Rectangle { +component ToolBarItem inherits Box { width: Metrics.size-lg; height: Metrics.size-lg; - border-radius: Metrics.radius-md; - background: DarkPalette.background[2]; + j-elevation: 2; } export component ToolBar inherits VerticalBox { diff --git a/ui/widgets/layout.slint b/ui/widgets/layout.slint index 6edff15..f87a383 100644 --- a/ui/widgets/layout.slint +++ b/ui/widgets/layout.slint @@ -45,3 +45,16 @@ export component VerticalBox inherits Rectangle { @children } } + +export component Box inherits Rectangle { + in property j-elevation: 1; + in property j-rounding: Metrics.radius-md; + in property j-padding: Metrics.padding-md; + + background: DarkPalette.background[j-elevation]; + border-radius: j-rounding; + clip: true; + padding: j-padding; + + @children +}