1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3
4import { Palette } from "std-widgets.slint";
5
6export global Icons {
7 out property <image> add: @image-url("../assets/add.svg");
8 out property <image> chevron-down: @image-url("../assets/chevron-down.svg");
9 out property <image> inspect: @image-url("../assets/inspect.svg");
10 out property <image> search: @image-url("../assets/search.svg");
11 out property <image> filter: @image-url("../assets/filter.svg");
12 out property <image> sidebar-left-off: @image-url("../assets/layout-sidebar-left-off.svg");
13 out property <image> sidebar-right-off: @image-url("../assets/layout-sidebar-right-off.svg");
14 out property <image> sidebar-left: @image-url("../assets/layout-sidebar-left.svg");
15 out property <image> sidebar-right: @image-url("../assets/layout-sidebar-right.svg");
16 out property <image> sync: @image-url("../assets/sync.svg");
17 out property <image> black-square: @image-url("../assets/black-square.png");
18 out property <image> checkerboard: @image-url("../assets/background.svg");
19 out property <image> checkerboard-mini: @image-url("../assets/background-mini.svg");
20 out property <image> checkerboard-tiny: @image-url("../assets/background-tiny.svg");
21 out property <image> close: @image-url("../assets/close.svg");
22 out property <image> plus: @image-url("../assets/plus.svg");
23 out property <image> minus: @image-url("../assets/minus.svg");
24}
25
26export struct TextStyle {
27 font-size: relative-font-size,
28 font-weight: int,
29}
30
31export global EditorFontSettings {
32 out property <int> light-font-weight: 100;
33 out property <int> regular-font-weight: 400;
34 out property <int> semibold-font-weight: 700;
35 out property <int> bold-font-weight: 900;
36
37 out property <TextStyle> header: { font-size: 18 * 0.0769rem, font-weight: root.semibold-font-weight };
38
39 out property <TextStyle> body: { font-size: 14 * 0.0769rem, font-weight: root.regular-font-weight };
40 out property <TextStyle> label: { font-size: 14 * 0.0769rem, font-weight: root.regular-font-weight };
41 out property <TextStyle> label-sub: { font-size: 14 * 0.0769rem, font-weight: root.light-font-weight };
42
43 out property <TextStyle> body-strong: { font-size: 16 * 0.0769rem, font-weight: root.bold-font-weight };
44}
45
46export global EditorSpaceSettings {
47 in property <length> default-padding: 8px;
48 in property <length> default-spacing: 8px;
49 in property <length> group-indent: 25px;
50 in property <length> property-spacing: 5px;
51}
52
53export global EditorSizeSettings {
54 in property <length> default-icon-width: 20px;
55 in property <length> eightbit-int-size: 40px;
56 in property <length> float-size: 100px;
57 in property <length> header-height: 32px;
58 in property <length> hex-size: 80px;
59 in property <length> item-height: 24px;
60 in property <length> length-combo: 70px;
61 in property <length> min-prefix-text-width: 120px;
62 in property <length> property-bar-width: 360px;
63 in property <length> radius: 5px;
64 in property <length> side-bar-width: 280px;
65 out property <length> standard-margin: 16px;
66 out property <length> small-margin: 12px;
67 out property <length> property-border-radius: 5px;
68}
69
70export global EditorPalette {
71
72 property <bool> dark-color-scheme: Palette.color-scheme == ColorScheme.dark;
73
74 out property <brush> drop-mark-background: #00ff0080;
75 out property <brush> drop-mark-foreground: #00ff00ff;
76
77 out property <brush> general-element-selection-primary: #3884ed;
78 out property <brush> general-element-selection-secondary: #86b5fc;
79 out property <brush> general-element-selection-selected: Palette.accent-foreground;
80 out property <brush> interactive-element-selection-primary: #8fff79;
81 out property <brush> interactive-element-selection-secondary: #48dc2a;
82 out property <brush> layout-element-selection-primary: #FFC5FC;
83 out property <brush> layout-element-selection-secondary: #ff8af9;
84 out property <brush> shadow-gradient: @linear-gradient(0deg, Palette.foreground.transparentize(1), Palette.foreground.transparentize(0.75));
85
86 out property <brush> state-hovered: root.dark-color-scheme ? #ffffff.with-alpha(0.1) : #000000.with-alpha(0.1);
87 out property <brush> state-pressed: root.dark-color-scheme ? #ffffff.with-alpha(0.2) : #000000.with-alpha(0.2);
88 out property <color> text-color: Palette.color-scheme == ColorScheme.dark ? white : #383838;
89 out property <color> section-color: Palette.color-scheme == ColorScheme.dark ? #3f3f3f : #e6e6e6;
90 out property <color> divider-color: Palette.color-scheme == ColorScheme.dark ? #444444 : #e6e6e6;
91}
92
93export global EditorAnimationSettings {
94 out property <duration> resize-duration: 200ms;
95 out property <duration> color-duration: 200ms;
96 out property <duration> rotation-duration: 200ms;
97}
98