Skip to content

Commit 368a9e4

Browse files
committed
fixed regression on accent foreground
1 parent b31890e commit 368a9e4

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

internal/compiler/widgets/cupertino/button.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright © SixtyFPS GmbH <[email protected]>
22
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
33

4-
import { CupertinoFontSettings, CupertinoPalette } from "styling.slint";
4+
import { CupertinoFontSettings, CupertinoPalette, CupertinoColors } from "styling.slint";
55
import { FocusBorder } from "components.slint";
66

77
export component Button {
@@ -44,7 +44,7 @@ export component Button {
4444
root.background: root.primary ? CupertinoPalette.secondary-accent-background : CupertinoPalette.secondary-control-background;
4545
}
4646
checked when root.checked: {
47-
root.text-color: CupertinoPalette.accent-foreground;
47+
root.text-color: root.primary ? CupertinoColors.white : CupertinoPalette.secondary-accent-background;
4848
}
4949
]
5050

internal/compiler/widgets/cupertino/styling.slint

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export global CupertinoColors {
4545
out property <color> mint: #00C7BE;
4646
out property <color> teal: #59ADC4;
4747
out property <color> cyan: #55BEF0;
48-
out property <color> blue: #326CCF;
48+
out property <color> blue: #4585F2;
4949
out property <color> indigo: #5856D6;
5050
out property <color> purple: #AF52DE;
5151
out property <color> pink: #FF2D55;
@@ -69,7 +69,7 @@ export global CupertinoPalette {
6969
out property <brush> foreground: dark-color-scheme ? CupertinoColors.systemGray6 : CupertinoColors.systemGray6-dark;
7070
out property <brush> alternate-background: dark-color-scheme ? CupertinoColors.systemGray5-dark : CupertinoColors.systemGray5;
7171
out property <brush> alternate-foreground: dark-color-scheme ? CupertinoColors.systemGray5 : CupertinoColors.systemGray5-dark;
72-
out property <brush> control-background: dark-color-scheme ? CupertinoColors.systemGray2-dark : CupertinoColors.white;
72+
out property <brush> control-background: dark-color-scheme ? CupertinoColors.systemGray3-dark : CupertinoColors.white;
7373
out property <brush> control-foreground: dark-color-scheme ? CupertinoColors.systemGray4 : CupertinoColors.systemGray5-dark;
7474
out property <brush> accent-background: dark-color-scheme ? CupertinoColors.selection-color : CupertinoColors.selection-color;
7575
out property <brush> accent-foreground: CupertinoColors.systemGray5;
@@ -103,7 +103,7 @@ export global CupertinoPalette {
103103
out property <brush> state-secondary: dark-color-scheme ? CupertinoColors.systemGray6-dark : CupertinoColors.systemGray6;
104104

105105
// FIXME: dark color
106-
out property <brush> dimmer: @linear-gradient(180deg, CupertinoColors.white 100%, CupertinoColors.black 0%);
106+
out property <brush> dimmer: @linear-gradient(180deg, CupertinoColors.white.transparentize(0.9) 100%, CupertinoColors.black 0%);
107107
}
108108

109109
export global Icons {

tools/lsp/ui/main.slint

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export component PreviewUi inherits Window {
6262
WindowGlobal.window-height = self.height;
6363
}
6464

65-
if Api.show-preview-ui : MenuBar {
65+
if Api.show-preview-ui: MenuBar {
6666
Menu {
6767
title: @tr("File");
6868

@@ -149,6 +149,7 @@ export component PreviewUi inherits Window {
149149
checked <=> root.console-panel-expanded;
150150
}
151151
}
152+
152153
if !Api.runs-in-slintpad: Menu {
153154
title: @tr("Window");
154155
MenuItem {
@@ -179,11 +180,10 @@ export component PreviewUi inherits Window {
179180
}
180181
if Api.show-preview-ui: FocusScope {
181182
key-pressed(event) => {
182-
if Api.undo-enabled && event.modifiers.control && event.text == "z" {
183+
if Api.undo-enabled && event.modifiers.control && event.text == "z" {
183184
Api.undo();
184185
return accept;
185-
} else if Api.redo-enabled && event.modifiers.control &&
186-
((Platform.os != OperatingSystemType.windows && event.text == "Z") || (Platform.os == OperatingSystemType.windows && event.text == "y")) {
186+
} else if Api.redo-enabled && event.modifiers.control && ((Platform.os != OperatingSystemType.windows && event.text == "Z") || (Platform.os == OperatingSystemType.windows && event.text == "y")) {
187187
Api.redo();
188188
return accept;
189189
}
@@ -246,7 +246,7 @@ export component PreviewUi inherits Window {
246246
visible-component <=> root.visible-component;
247247
}
248248

249-
if properties-widget || outline-widget || data-widget : right-panel := Rectangle {
249+
if properties-widget || outline-widget || data-widget: right-panel := Rectangle {
250250
width: EditorSizeSettings.property-bar-width + right-panel-border.width;
251251

252252
right-panel-border := Rectangle {
@@ -333,6 +333,7 @@ export component PreviewUi inherits Window {
333333

334334
// StatusLine { }
335335
}
336+
336337
cp := ConsolePanel {
337338
y: parent.height - self.height - 1px;
338339
width: parent.width;

0 commit comments

Comments
 (0)