Replace toolbar items with buttons

This commit is contained in:
Jarrod Doyle 2024-04-10 16:44:23 +01:00
parent d3e00abeac
commit 77b521bf93
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 41 additions and 19 deletions

View File

@ -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 { }
ToolBarItem { }
ToolBarItem {
p-text: "t";
}
ToolBarItem {
p-text: "t";
}
ToolBarItem {
p-text: "m";
}
}