Made default box alignment stretch

This commit is contained in:
Jarrod Doyle 2024-04-10 13:40:35 +01:00
parent f70979846e
commit c67f6efb32
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
7 changed files with 7 additions and 11 deletions

View File

@ -14,12 +14,10 @@ export component AppWindow inherits Window {
j-rounding: 0px; j-rounding: 0px;
j-padding: Metrics.padding-sm; j-padding: Metrics.padding-sm;
j-spacing: Metrics.spacing-sm; j-spacing: Metrics.spacing-sm;
j-alignment: stretch;
background: DarkPalette.background[0]; background: DarkPalette.background[0];
EditorBar { } EditorBar { }
HorizontalBox { HorizontalBox {
j-alignment: stretch;
background: DarkPalette.background[0]; background: DarkPalette.background[0];
j-padding: 0px; j-padding: 0px;
j-spacing: Metrics.spacing-sm; j-spacing: Metrics.spacing-sm;

View File

@ -4,6 +4,7 @@ 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; j-spacing: Metrics.spacing-xl;
j-alignment: start;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];

View File

@ -5,7 +5,6 @@ import { HorizontalBox, VerticalBox } from "widgets/layout.slint";
export component ObjectToolPanel inherits VerticalBox { export component ObjectToolPanel inherits VerticalBox {
width: 280px; width: 280px;
j-alignment: stretch;
Text { Text {
height: Metrics.size-md; height: Metrics.size-md;
@ -16,6 +15,7 @@ export component ObjectToolPanel inherits VerticalBox {
} }
Panel { Panel {
j-alignment: start;
title: @tr("Favourites"); title: @tr("Favourites");
j-elevation: 2; j-elevation: 2;
@ -83,11 +83,9 @@ export component ObjectToolPanel inherits VerticalBox {
Panel { Panel {
title: @tr("Hierarchy"); title: @tr("Hierarchy");
j-elevation: 2; j-elevation: 2;
j-alignment: stretch;
vertical-stretch: 1; vertical-stretch: 1;
HorizontalBox { HorizontalBox {
j-alignment: stretch;
j-elevation: 2; j-elevation: 2;
j-padding: 0px; j-padding: 0px;
j-spacing: Metrics.spacing-md; j-spacing: Metrics.spacing-md;
@ -101,7 +99,6 @@ export component ObjectToolPanel inherits VerticalBox {
} }
HorizontalBox { HorizontalBox {
j-alignment: stretch;
j-padding: 0px; j-padding: 0px;
Text { Text {
@ -129,8 +126,6 @@ export component ObjectToolPanel inherits VerticalBox {
} }
VerticalBox { VerticalBox {
j-alignment: stretch;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];
font-size: Metrics.font-lg; font-size: Metrics.font-lg;

View File

@ -5,6 +5,7 @@ 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; j-spacing: Metrics.spacing-lg;
j-alignment: start;
Text { Text {
color: DarkPalette.text[4]; color: DarkPalette.text[4];

View File

@ -12,6 +12,7 @@ component ToolBarItem inherits Rectangle {
export component ToolBar inherits VerticalBox { export component ToolBar inherits VerticalBox {
width: Metrics.size-xl; width: Metrics.size-xl;
j-alignment: start;
Button { Button {
checkable: true; checkable: true;

View File

@ -12,7 +12,7 @@ export component HorizontalBox inherits Rectangle {
in property <length> j-rounding: Metrics.radius-md; in property <length> j-rounding: Metrics.radius-md;
in property <length> j-padding: Metrics.padding-md; in property <length> j-padding: Metrics.padding-md;
in property <length> j-spacing: Metrics.spacing-md; in property <length> j-spacing: Metrics.spacing-md;
in property <LayoutAlignment> j-alignment: start; in property <LayoutAlignment> j-alignment: stretch;
background: DarkPalette.background[j-elevation]; background: DarkPalette.background[j-elevation];
border-radius: j-rounding; border-radius: j-rounding;
@ -32,7 +32,7 @@ export component VerticalBox inherits Rectangle {
in property <length> j-rounding: Metrics.radius-md; in property <length> j-rounding: Metrics.radius-md;
in property <length> j-padding: Metrics.padding-md; in property <length> j-padding: Metrics.padding-md;
in property <length> j-spacing: Metrics.spacing-md; in property <length> j-spacing: Metrics.spacing-md;
in property <LayoutAlignment> j-alignment: start; in property <LayoutAlignment> j-alignment: stretch;
background: DarkPalette.background[j-elevation]; background: DarkPalette.background[j-elevation];
border-radius: j-rounding; border-radius: j-rounding;

View File

@ -1,5 +1,5 @@
import { Metrics, DarkPalette } from "../theme.slint"; import { Metrics, DarkPalette } from "../theme.slint";
import { HorizontalBox, 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> title: "Title";