From 77b521bf93ce9a4b4454949d179b66bb6472884f Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Wed, 10 Apr 2024 16:44:23 +0100 Subject: [PATCH] Replace toolbar items with buttons --- ui/tool_bar.slint | 60 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 19 deletions(-) diff --git a/ui/tool_bar.slint b/ui/tool_bar.slint index 56e022f..3d58b34 100644 --- a/ui/tool_bar.slint +++ b/ui/tool_bar.slint @@ -1,49 +1,71 @@ import { Metrics, DarkPalette } from "theme.slint"; -import { Button } from "std-widgets.slint"; import { HorizontalSeparator } from "widgets/separator.slint"; import { Box, VerticalBox } from "widgets/layout.slint"; +import { Button } from "widgets/button.slint"; -component ToolBarItem inherits Box { +component ToolBarItem inherits Button { width: Metrics.size-lg; height: Metrics.size-lg; - j-elevation: 2; + p-elevation: 0; } export component ToolBar inherits VerticalBox { width: Metrics.size-xl; j-alignment: start; - Button { - checkable: true; + ToolBarItem { + p-text: "s"; } - ToolBarItem { } + ToolBarItem { + p-text: "m"; + } - ToolBarItem { } + ToolBarItem { + p-text: "r"; + } - ToolBarItem { } - - ToolBarItem { } + ToolBarItem { + p-text: "s"; + } HorizontalSeparator { } - ToolBarItem { } + ToolBarItem { + p-text: "b"; + } - ToolBarItem { } + ToolBarItem { + p-text: "o"; + } - ToolBarItem { } + ToolBarItem { + p-text: "f"; + } - ToolBarItem { } + ToolBarItem { + p-text: "r"; + } - ToolBarItem { } + ToolBarItem { + p-text: "l"; + } - ToolBarItem { } + ToolBarItem { + p-text: "a"; + } HorizontalSeparator { } - ToolBarItem { } + ToolBarItem { + p-text: "t"; + } - ToolBarItem { } + ToolBarItem { + p-text: "t"; + } - ToolBarItem { } + ToolBarItem { + p-text: "m"; + } }