Add separator widgets

This commit is contained in:
Jarrod Doyle 2024-04-09 20:52:34 +01:00
parent 6e2dc9fd6a
commit f6710fb383
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
3 changed files with 23 additions and 26 deletions

View File

@ -1,4 +1,5 @@
import { Theme } from "theme.slint";
import { VerticalSeparator } from "widgets/separator.slint";
export component StatusBar inherits Rectangle {
border-color: black;
@ -14,23 +15,13 @@ export component StatusBar inherits Rectangle {
text: "Last saved: 18:50";
}
Path {
width: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 0 24 Z";
}
VerticalSeparator { }
Text {
vertical-alignment: center;
text: "Saved by: Jayrude";
}
Path {
width: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 0 24 Z";
}
VerticalSeparator { }
}
}

View File

@ -1,5 +1,6 @@
import { Theme } from "theme.slint";
import { Button } from "std-widgets.slint";
import { HorizontalSeparator } from "widgets/separator.slint";
component ToolBarItem inherits Rectangle {
width: Theme.size-lg;
@ -31,13 +32,7 @@ export component ToolBar inherits Rectangle {
ToolBarItem { }
Path {
width: 32px;
height: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 32 0 Z";
}
HorizontalSeparator { }
ToolBarItem { }
@ -51,13 +46,7 @@ export component ToolBar inherits Rectangle {
ToolBarItem { }
Path {
width: 32px;
height: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 32 0 Z";
}
HorizontalSeparator { }
ToolBarItem { }

View File

@ -0,0 +1,17 @@
export component VerticalSeparator {
Path {
width: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 0 1 Z";
}
}
export component HorizontalSeparator {
Path {
height: 1px;
stroke: black;
stroke-width: 1px;
commands: "M 0 0 L 1 0 Z";
}
}