Add separator widgets
This commit is contained in:
parent
6e2dc9fd6a
commit
f6710fb383
|
@ -1,4 +1,5 @@
|
||||||
import { Theme } from "theme.slint";
|
import { Theme } from "theme.slint";
|
||||||
|
import { VerticalSeparator } from "widgets/separator.slint";
|
||||||
|
|
||||||
export component StatusBar inherits Rectangle {
|
export component StatusBar inherits Rectangle {
|
||||||
border-color: black;
|
border-color: black;
|
||||||
|
@ -14,23 +15,13 @@ export component StatusBar inherits Rectangle {
|
||||||
text: "Last saved: 18:50";
|
text: "Last saved: 18:50";
|
||||||
}
|
}
|
||||||
|
|
||||||
Path {
|
VerticalSeparator { }
|
||||||
width: 1px;
|
|
||||||
stroke: black;
|
|
||||||
stroke-width: 1px;
|
|
||||||
commands: "M 0 0 L 0 24 Z";
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
vertical-alignment: center;
|
vertical-alignment: center;
|
||||||
text: "Saved by: Jayrude";
|
text: "Saved by: Jayrude";
|
||||||
}
|
}
|
||||||
|
|
||||||
Path {
|
VerticalSeparator { }
|
||||||
width: 1px;
|
|
||||||
stroke: black;
|
|
||||||
stroke-width: 1px;
|
|
||||||
commands: "M 0 0 L 0 24 Z";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Theme } from "theme.slint";
|
import { Theme } from "theme.slint";
|
||||||
import { Button } from "std-widgets.slint";
|
import { Button } from "std-widgets.slint";
|
||||||
|
import { HorizontalSeparator } from "widgets/separator.slint";
|
||||||
|
|
||||||
component ToolBarItem inherits Rectangle {
|
component ToolBarItem inherits Rectangle {
|
||||||
width: Theme.size-lg;
|
width: Theme.size-lg;
|
||||||
|
@ -31,13 +32,7 @@ export component ToolBar inherits Rectangle {
|
||||||
|
|
||||||
ToolBarItem { }
|
ToolBarItem { }
|
||||||
|
|
||||||
Path {
|
HorizontalSeparator { }
|
||||||
width: 32px;
|
|
||||||
height: 1px;
|
|
||||||
stroke: black;
|
|
||||||
stroke-width: 1px;
|
|
||||||
commands: "M 0 0 L 32 0 Z";
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolBarItem { }
|
ToolBarItem { }
|
||||||
|
|
||||||
|
@ -51,13 +46,7 @@ export component ToolBar inherits Rectangle {
|
||||||
|
|
||||||
ToolBarItem { }
|
ToolBarItem { }
|
||||||
|
|
||||||
Path {
|
HorizontalSeparator { }
|
||||||
width: 32px;
|
|
||||||
height: 1px;
|
|
||||||
stroke: black;
|
|
||||||
stroke-width: 1px;
|
|
||||||
commands: "M 0 0 L 32 0 Z";
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolBarItem { }
|
ToolBarItem { }
|
||||||
|
|
||||||
|
|
|
@ -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";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue