Compare commits

...

2 Commits

7 changed files with 61 additions and 66 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 {
j-rounding: 0px; p-rounding: 0px;
j-padding: Metrics.padding-sm; p-padding: Metrics.padding-sm;
j-spacing: Metrics.spacing-sm; p-spacing: Metrics.spacing-sm;
background: DarkPalette.background[0]; background: DarkPalette.background[0];
EditorBar { } EditorBar { }
HorizontalBox { HorizontalBox {
background: DarkPalette.background[0]; background: DarkPalette.background[0];
j-padding: 0px; p-padding: 0px;
j-spacing: Metrics.spacing-sm; p-spacing: Metrics.spacing-sm;
ToolBar { } ToolBar { }
@ -28,6 +28,7 @@ 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;
j-spacing: Metrics.spacing-xl; p-spacing: Metrics.spacing-xl;
j-alignment: start; p-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 {
j-alignment: start; p-alignment: start;
title: @tr("Favourites"); p-title: @tr("Favourites");
j-elevation: 2; p-elevation: 2;
Panel { Panel {
title: "Group Name"; p-title: "Group Name";
title-alignment: center; p-title-alignment: center;
j-spacing: 0px; p-spacing: 0px;
Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
@ -50,9 +50,9 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
title: "Group Name"; p-title: "Group Name";
title-alignment: center; p-title-alignment: center;
j-spacing: 0px; p-spacing: 0px;
Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
@ -81,14 +81,14 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
title: @tr("Hierarchy"); p-title: @tr("Hierarchy");
j-elevation: 2; p-elevation: 2;
vertical-stretch: 1; vertical-stretch: 1;
HorizontalBox { HorizontalBox {
j-elevation: 2; p-elevation: 2;
j-padding: 0px; p-padding: 0px;
j-spacing: Metrics.spacing-md; p-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 {
j-padding: 0px; p-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;
j-elevation: 3; p-elevation: 3;
Rectangle { } Rectangle { }
} }
Box { Box {
width: Metrics.size-md; width: Metrics.size-md;
j-elevation: 3; p-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;
j-spacing: Metrics.spacing-lg; p-spacing: Metrics.spacing-lg;
j-alignment: start; p-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;
j-alignment: start; p-alignment: start;
ToolBarItem { ToolBarItem {
p-text: "s"; p-text: "s";

View File

@ -1,60 +1,54 @@
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> j-elevation: 1; in property <int> p-elevation: 1;
in property <length> j-rounding: Metrics.radius-md; in property <length> p-rounding: Metrics.radius-md;
in property <length> j-padding: Metrics.padding-md; in property <length> p-padding: Metrics.padding-md;
in property <length> j-spacing: Metrics.spacing-md; in property <length> p-spacing: Metrics.spacing-md;
in property <LayoutAlignment> j-alignment: stretch; in property <LayoutAlignment> p-alignment: stretch;
background: DarkPalette.background[j-elevation]; background: DarkPalette.background[p-elevation];
border-radius: j-rounding; border-radius: p-rounding;
clip: true; clip: true;
HorizontalLayout { c-layout := HorizontalLayout {
alignment: j-alignment; alignment: p-alignment;
padding: j-padding; padding: p-padding;
spacing: j-spacing; spacing: p-spacing;
@children @children
} }
} }
export component VerticalBox inherits Rectangle { export component VerticalBox inherits Rectangle {
// TODO: border, shadow // TODO: border, shadow
in property <int> j-elevation: 1; in property <int> p-elevation: 1;
in property <length> j-rounding: Metrics.radius-md; in property <length> p-rounding: Metrics.radius-md;
in property <length> j-padding: Metrics.padding-md; in property <length> p-padding: Metrics.padding-md;
in property <length> j-spacing: Metrics.spacing-md; in property <length> p-spacing: Metrics.spacing-md;
in property <LayoutAlignment> j-alignment: stretch; in property <LayoutAlignment> p-alignment: stretch;
background: DarkPalette.background[j-elevation]; background: DarkPalette.background[p-elevation];
border-radius: j-rounding; border-radius: p-rounding;
clip: true; clip: true;
VerticalLayout { c-layout := VerticalLayout {
alignment: j-alignment; alignment: p-alignment;
padding: j-padding; padding: p-padding;
spacing: j-spacing; spacing: p-spacing;
@children @children
} }
} }
export component Box inherits Rectangle { export component Box inherits Rectangle {
in property <int> j-elevation: 1; in property <int> p-elevation: 1;
in property <length> j-rounding: Metrics.radius-md; in property <length> p-rounding: Metrics.radius-md;
in property <length> j-padding: Metrics.padding-md; in property <length> p-padding: Metrics.padding-md;
background: DarkPalette.background[j-elevation]; background: DarkPalette.background[p-elevation];
border-radius: j-rounding; border-radius: p-rounding;
clip: true; clip: true;
padding: j-padding; padding: p-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> title: "Title"; in property <string> p-title: "Title";
in property <TextHorizontalAlignment> title-alignment: left; in property <TextHorizontalAlignment> p-title-alignment: left;
Text { c-title := 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: title; text: p-title;
vertical-alignment: center; vertical-alignment: center;
horizontal-alignment: title-alignment; horizontal-alignment: p-title-alignment;
} }
@children @children