Move Palette.style-name to internal protected StyleMetrics.style-name (#8200)

This is only exposed when internal types are exposed (such as in the lsp).

The plan is to make this public under a new name/global after the release.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
This commit is contained in:
Simon Hausmann 2025-04-19 10:20:52 +02:00 committed by GitHub
parent eafa9bae12
commit 8761eaadeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 96 additions and 66 deletions

View file

@ -8,7 +8,7 @@ export { LineEdit } from "lineedit.slint";
import { FluentPalette } from "styling.slint";
export { MenuBarItem, MenuBar, MenuFrame, MenuItem } from "menu.slint";
export global StyleMetrics {
export global StyleMetrics {
out property <length> layout-spacing: 8px;
out property <length> layout-padding: 8px;
out property <length> text-cursor-width: 1px;
@ -19,10 +19,10 @@ export global StyleMetrics {
out property <color> textedit-background-disabled: FluentPalette.control-disabled;
out property <color> textedit-text-color-disabled: FluentPalette.text-disabled;
out property <bool> dark-color-scheme: Palette.color-scheme == ColorScheme.dark;
out property <string> style-name: "fluent";
}
export global Palette {
out property <string> style-name: "fluent";
out property <brush> background: FluentPalette.background;
out property <brush> foreground: FluentPalette.foreground;
out property <brush> alternate-background: FluentPalette.alternate-background;