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 { Metrics, DarkPalette } from "theme.slint";
import { Button } from "std-widgets.slint";
import { HorizontalSeparator } from "widgets/separator.slint"; import { HorizontalSeparator } from "widgets/separator.slint";
import { Box, VerticalBox } from "widgets/layout.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; width: Metrics.size-lg;
height: Metrics.size-lg; height: Metrics.size-lg;
j-elevation: 2; p-elevation: 0;
} }
export component ToolBar inherits VerticalBox { export component ToolBar inherits VerticalBox {
width: Metrics.size-xl; width: Metrics.size-xl;
j-alignment: start; j-alignment: start;
Button { ToolBarItem {
checkable: true; p-text: "s";
} }
ToolBarItem { } ToolBarItem {
p-text: "m";
}
ToolBarItem { } ToolBarItem {
p-text: "r";
}
ToolBarItem { } ToolBarItem {
p-text: "s";
ToolBarItem { } }
HorizontalSeparator { } 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 { } HorizontalSeparator { }
ToolBarItem { } ToolBarItem {
p-text: "t";
}
ToolBarItem { } ToolBarItem {
p-text: "t";
}
ToolBarItem { } ToolBarItem {
p-text: "m";
}
} }