Make separators inherit Path directly and allow elevation setting
This commit is contained in:
parent
35966bc8e3
commit
4ccbd7b28b
|
@ -4,7 +4,6 @@ import { StatusBar } from "status_bar.slint";
|
|||
import { ToolBar } from "tool_bar.slint";
|
||||
import { ObjectToolPanel } from "object_tool_panel.slint";
|
||||
import { VerticalBox, HorizontalBox } from "widgets/layout.slint";
|
||||
import { VerticalSeparator } from "widgets/separator.slint";
|
||||
|
||||
export component AppWindow inherits Window {
|
||||
title: @tr("FM Editor");
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
import {DarkPalette} from "../theme.slint";
|
||||
|
||||
export component VerticalSeparator {
|
||||
export component VerticalSeparator inherits Path {
|
||||
in property <int> p-elevation: 0;
|
||||
|
||||
width: 1px;
|
||||
Path {
|
||||
width: 1px;
|
||||
stroke: DarkPalette.background[0];
|
||||
stroke-width: 1px;
|
||||
commands: "M 0 0 L 0 1 Z";
|
||||
}
|
||||
stroke: DarkPalette.background[root.p-elevation];
|
||||
stroke-width: 1px;
|
||||
commands: "M 0 0 L 0 1 Z";
|
||||
}
|
||||
|
||||
export component HorizontalSeparator {
|
||||
export component HorizontalSeparator inherits Path {
|
||||
in property <int> p-elevation: 0;
|
||||
|
||||
height: 1px;
|
||||
Path {
|
||||
height: 1px;
|
||||
stroke: DarkPalette.background[0];
|
||||
stroke-width: 1px;
|
||||
commands: "M 0 0 L 1 0 Z";
|
||||
}
|
||||
stroke: DarkPalette.background[root.p-elevation];
|
||||
stroke-width: 1px;
|
||||
commands: "M 0 0 L 1 0 Z";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue