mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
std-widgets: added LayoutSpec global (#6711)
This commit is contained in:
parent
e3ea25f48c
commit
c84af1a8d7
27 changed files with 79 additions and 104 deletions
|
@ -1,7 +1,7 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
||||
|
||||
import { VerticalBox } from "./layouts.slint";
|
||||
import { VerticalBox } from "../common/layout.slint";
|
||||
import { Button } from "./button.slint";
|
||||
import { FluentPalette, FluentFontSettings, Icons } from "styling.slint";
|
||||
import { MenuBorder } from "./components.slint";
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
||||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
||||
|
||||
import { StyleMetrics } from "std-widgets-impl.slint";
|
||||
|
||||
export component VerticalBox inherits VerticalLayout {
|
||||
spacing: StyleMetrics.layout-spacing;
|
||||
padding: StyleMetrics.layout-padding;
|
||||
}
|
||||
export component HorizontalBox inherits HorizontalLayout {
|
||||
spacing: StyleMetrics.layout-spacing;
|
||||
padding: StyleMetrics.layout-padding;
|
||||
}
|
||||
export component GridBox inherits GridLayout {
|
||||
spacing: StyleMetrics.layout-spacing;
|
||||
padding: StyleMetrics.layout-padding;
|
||||
}
|
|
@ -7,9 +7,14 @@ export { ListItem } from "components.slint";
|
|||
export { LineEdit } from "lineedit.slint";
|
||||
import { FluentPalette } from "styling.slint";
|
||||
|
||||
export global StyleMetrics {
|
||||
export global LayoutSpec {
|
||||
out property <length> layout-spacing: 8px;
|
||||
out property <length> layout-padding: 8px;
|
||||
}
|
||||
|
||||
export global StyleMetrics {
|
||||
out property <length> layout-spacing: LayoutSpec.layout-spacing;
|
||||
out property <length> layout-padding: LayoutSpec.layout-padding;
|
||||
out property <length> text-cursor-width: 1px;
|
||||
out property <color> window-background: FluentPalette.background;
|
||||
out property <color> default-text-color: FluentPalette.foreground;
|
||||
|
@ -34,3 +39,4 @@ export global Palette {
|
|||
out property <brush> border: FluentPalette.border;
|
||||
in-out property <ColorScheme> color-scheme <=> FluentPalette.color-scheme;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
export { AboutSlint } from "../common/about-slint.slint";
|
||||
export { StandardButton } from "../common/standardbutton.slint";
|
||||
export { StyleMetrics, ScrollView, Button, Palette } from "std-widgets-impl.slint";
|
||||
export { StyleMetrics, ScrollView, Button, Palette, LayoutSpec } from "std-widgets-impl.slint";
|
||||
|
||||
export { CheckBox } from "checkbox.slint";
|
||||
export { ComboBox } from "combobox.slint";
|
||||
|
@ -17,7 +17,7 @@ export { Slider } from "slider.slint";
|
|||
export { SpinBox } from "spinbox.slint";
|
||||
export { Spinner } from "spinner.slint";
|
||||
export { TabWidgetImpl, TabImpl, TabBarImpl, TabWidget } from "tabwidget.slint";
|
||||
export { VerticalBox, HorizontalBox, GridBox } from "layouts.slint";
|
||||
export { VerticalBox, HorizontalBox, GridBox } from "../common/layout.slint";
|
||||
export { Switch } from "switch.slint";
|
||||
export { TextEdit } from "textedit.slint";
|
||||
export { TimePickerPopup, Time } from "time-picker.slint";
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
|
||||
|
||||
import { Time, TimePickerBase } from "../common/time-picker-base.slint";
|
||||
import { VerticalBox } from "./layouts.slint";
|
||||
import { VerticalBox } from "../common/layout.slint";
|
||||
import { Button } from "./button.slint";
|
||||
import { FluentPalette, FluentFontSettings, Icons } from "styling.slint";
|
||||
import { MenuBorder } from "./components.slint";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue