Compare commits

..

No commits in common. "35966bc8e3c1af07d6a01983f2784abce3c16e24" and "77b521bf93ce9a4b4454949d179b66bb6472884f" have entirely different histories.

7 changed files with 66 additions and 61 deletions

View File

@ -11,16 +11,16 @@ export component AppWindow inherits Window {
preferred-width: 1280px; preferred-width: 1280px;
preferred-height: 720px; preferred-height: 720px;
VerticalBox { VerticalBox {
p-rounding: 0px; j-rounding: 0px;
p-padding: Metrics.padding-sm; j-padding: Metrics.padding-sm;
p-spacing: Metrics.spacing-sm; j-spacing: Metrics.spacing-sm;
background: DarkPalette.background[0]; background: DarkPalette.background[0];
EditorBar { } EditorBar { }
HorizontalBox { HorizontalBox {
background: DarkPalette.background[0]; background: DarkPalette.background[0];
p-padding: 0px; j-padding: 0px;
p-spacing: Metrics.spacing-sm; j-spacing: Metrics.spacing-sm;
ToolBar { } ToolBar { }
@ -28,7 +28,6 @@ export component AppWindow inherits Window {
Rectangle { Rectangle {
Text { Text {
color: DarkPalette.text[4];
font-size: Metrics.font-lg; font-size: Metrics.font-lg;
text: "INSERT VIEWPORT HERE"; text: "INSERT VIEWPORT HERE";
vertical-alignment: center; vertical-alignment: center;

View File

@ -3,8 +3,8 @@ import { HorizontalBox } from "widgets/layout.slint";
export component EditorBar inherits HorizontalBox { export component EditorBar inherits HorizontalBox {
height: Metrics.size-xl; height: Metrics.size-xl;
p-spacing: Metrics.spacing-xl; j-spacing: Metrics.spacing-xl;
p-alignment: start; j-alignment: start;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];

View File

@ -15,14 +15,14 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
p-alignment: start; j-alignment: start;
p-title: @tr("Favourites"); title: @tr("Favourites");
p-elevation: 2; j-elevation: 2;
Panel { Panel {
p-title: "Group Name"; title: "Group Name";
p-title-alignment: center; title-alignment: center;
p-spacing: 0px; j-spacing: 0px;
Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
@ -50,9 +50,9 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
p-title: "Group Name"; title: "Group Name";
p-title-alignment: center; title-alignment: center;
p-spacing: 0px; j-spacing: 0px;
Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
@ -81,14 +81,14 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
p-title: @tr("Hierarchy"); title: @tr("Hierarchy");
p-elevation: 2; j-elevation: 2;
vertical-stretch: 1; vertical-stretch: 1;
HorizontalBox { HorizontalBox {
p-elevation: 2; j-elevation: 2;
p-padding: 0px; j-padding: 0px;
p-spacing: Metrics.spacing-md; j-spacing: Metrics.spacing-md;
height: Metrics.size-md; height: Metrics.size-md;
Text { Text {
@ -99,7 +99,7 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Box { Box {
p-padding: 0px; j-padding: 0px;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];
@ -112,14 +112,14 @@ export component ObjectToolPanel inherits VerticalBox {
Box { Box {
width: Metrics.size-md; width: Metrics.size-md;
p-elevation: 3; j-elevation: 3;
Rectangle { } Rectangle { }
} }
Box { Box {
width: Metrics.size-md; width: Metrics.size-md;
p-elevation: 3; j-elevation: 3;
Rectangle { } Rectangle { }
} }

View File

@ -4,8 +4,8 @@ import { HorizontalBox } from "widgets/layout.slint";
export component StatusBar inherits HorizontalBox { export component StatusBar inherits HorizontalBox {
height: Metrics.size-lg; height: Metrics.size-lg;
p-spacing: Metrics.spacing-lg; j-spacing: Metrics.spacing-lg;
p-alignment: start; j-alignment: start;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];

View File

@ -11,7 +11,7 @@ component ToolBarItem inherits Button {
export component ToolBar inherits VerticalBox { export component ToolBar inherits VerticalBox {
width: Metrics.size-xl; width: Metrics.size-xl;
p-alignment: start; j-alignment: start;
ToolBarItem { ToolBarItem {
p-text: "s"; p-text: "s";

View File

@ -1,54 +1,60 @@
import {Metrics, DarkPalette} from "../theme.slint"; import {Metrics, DarkPalette} from "../theme.slint";
struct BorderStyle {
border-width: length,
border-color: brush,
border-radius: length,
}
export component HorizontalBox inherits Rectangle { export component HorizontalBox inherits Rectangle {
// TODO: border, shadow // TODO: border, shadow
in property <int> p-elevation: 1; in property <int> j-elevation: 1;
in property <length> p-rounding: Metrics.radius-md; in property <length> j-rounding: Metrics.radius-md;
in property <length> p-padding: Metrics.padding-md; in property <length> j-padding: Metrics.padding-md;
in property <length> p-spacing: Metrics.spacing-md; in property <length> j-spacing: Metrics.spacing-md;
in property <LayoutAlignment> p-alignment: stretch; in property <LayoutAlignment> j-alignment: stretch;
background: DarkPalette.background[p-elevation]; background: DarkPalette.background[j-elevation];
border-radius: p-rounding; border-radius: j-rounding;
clip: true; clip: true;
c-layout := HorizontalLayout { HorizontalLayout {
alignment: p-alignment; alignment: j-alignment;
padding: p-padding; padding: j-padding;
spacing: p-spacing; spacing: j-spacing;
@children @children
} }
} }
export component VerticalBox inherits Rectangle { export component VerticalBox inherits Rectangle {
// TODO: border, shadow // TODO: border, shadow
in property <int> p-elevation: 1; in property <int> j-elevation: 1;
in property <length> p-rounding: Metrics.radius-md; in property <length> j-rounding: Metrics.radius-md;
in property <length> p-padding: Metrics.padding-md; in property <length> j-padding: Metrics.padding-md;
in property <length> p-spacing: Metrics.spacing-md; in property <length> j-spacing: Metrics.spacing-md;
in property <LayoutAlignment> p-alignment: stretch; in property <LayoutAlignment> j-alignment: stretch;
background: DarkPalette.background[p-elevation]; background: DarkPalette.background[j-elevation];
border-radius: p-rounding; border-radius: j-rounding;
clip: true; clip: true;
c-layout := VerticalLayout { VerticalLayout {
alignment: p-alignment; alignment: j-alignment;
padding: p-padding; padding: j-padding;
spacing: p-spacing; spacing: j-spacing;
@children @children
} }
} }
export component Box inherits Rectangle { export component Box inherits Rectangle {
in property <int> p-elevation: 1; in property <int> j-elevation: 1;
in property <length> p-rounding: Metrics.radius-md; in property <length> j-rounding: Metrics.radius-md;
in property <length> p-padding: Metrics.padding-md; in property <length> j-padding: Metrics.padding-md;
background: DarkPalette.background[p-elevation]; background: DarkPalette.background[j-elevation];
border-radius: p-rounding; border-radius: j-rounding;
clip: true; clip: true;
padding: p-padding; padding: j-padding;
@children @children
} }

View File

@ -2,16 +2,16 @@ import { Metrics, DarkPalette } from "../theme.slint";
import { VerticalBox } from "layout.slint"; import { VerticalBox } from "layout.slint";
export component Panel inherits VerticalBox { export component Panel inherits VerticalBox {
in property <string> p-title: "Title"; in property <string> title: "Title";
in property <TextHorizontalAlignment> p-title-alignment: left; in property <TextHorizontalAlignment> title-alignment: left;
c-title := Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
color: DarkPalette.text[4]; color: DarkPalette.text[4];
font-size: Metrics.font-md; font-size: Metrics.font-md;
text: p-title; text: title;
vertical-alignment: center; vertical-alignment: center;
horizontal-alignment: p-title-alignment; horizontal-alignment: title-alignment;
} }
@children @children