From 14d04f6a77e0eb76c2442cb1abe278cc5a7341de Mon Sep 17 00:00:00 2001 From: Vyn Date: Mon, 4 Nov 2024 10:49:06 +0100 Subject: [PATCH] Use Green, Orange and Red colors for Selenite's palette --- external/selenite | 2 +- src/AppWindowBackend.cpp | 1 + src/SeleniteSetup.h | 5 ++++- ui/windows/EditSourceWindow.slint | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/external/selenite b/external/selenite index a2e151c..9cba85a 160000 --- a/external/selenite +++ b/external/selenite @@ -1 +1 @@ -Subproject commit a2e151c99dd7811f348729aa08c098520cada519 +Subproject commit 9cba85a21aa6c2eee6101dd38252249283816327 diff --git a/src/AppWindowBackend.cpp b/src/AppWindowBackend.cpp index 5ddb993..fda3156 100644 --- a/src/AppWindowBackend.cpp +++ b/src/AppWindowBackend.cpp @@ -55,6 +55,7 @@ AppWindowBackend::AppWindowBackend(mirai::Mirai *miraiInstance) setSelenitePalette(mainWindow_->global(), palette.value()); setSelenitePalette(settingsWindow_->global(), palette.value()); setSelenitePalette(addSourceWindow_->global(), palette.value()); + setSelenitePalette(editSourceWindow_->global(), palette.value()); } mainWindow_->global().set_sources(sourcesNames); diff --git a/src/SeleniteSetup.h b/src/SeleniteSetup.h index 2b914b0..c263e3c 100644 --- a/src/SeleniteSetup.h +++ b/src/SeleniteSetup.h @@ -17,6 +17,7 @@ slint::Color seleniteColorToSlint(const selenite::Color &color) void setSelenitePalette(const ui::Palette &uiPalette, const selenite::Palette &palette) { + uiPalette.set_accent(seleniteColorToSlint(palette.primary)); uiPalette.set_background(seleniteColorToSlint(palette.background)); uiPalette.set_pane(seleniteColorToSlint(palette.pane)); uiPalette.set_foreground(seleniteColorToSlint(palette.foreground)); @@ -24,5 +25,7 @@ void setSelenitePalette(const ui::Palette &uiPalette, const selenite::Palette &p uiPalette.set_control_background(seleniteColorToSlint(palette.background3)); uiPalette.set_control_foreground(seleniteColorToSlint(palette.foreground)); uiPalette.set_card_background(seleniteColorToSlint(palette.background2)); - uiPalette.set_accent(seleniteColorToSlint(palette.primary)); + uiPalette.set_green(seleniteColorToSlint(palette.green)); + uiPalette.set_orange(seleniteColorToSlint(palette.orange)); + uiPalette.set_red(seleniteColorToSlint(palette.red)); } diff --git a/ui/windows/EditSourceWindow.slint b/ui/windows/EditSourceWindow.slint index 81dd00c..9adb42c 100644 --- a/ui/windows/EditSourceWindow.slint +++ b/ui/windows/EditSourceWindow.slint @@ -36,7 +36,7 @@ export component EditSourceWindow inherits Window { } VButton { text: "Delete"; - background-color: Colors.red; + background-color: Palette.red; double-clicked => { Backend.delete-source(root.id) }