Sfoglia il codice sorgente

Added slight svg transparency as requested in ref issue, fixed bg detection logic

Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Dominique Fuchs 6 anni fa
parent
commit
e8c8fe4223

+ 11 - 2
src/gui/wizard/owncloudsetuppage.cpp

@@ -89,8 +89,17 @@ OwncloudSetupPage::OwncloudSetupPage(QWidget *parent)
     connect(_ui.nextButton, &QPushButton::clicked, _ui.slideShow, &SlideShow::nextSlide);
     connect(_ui.prevButton, &QPushButton::clicked, _ui.slideShow, &SlideShow::prevSlide);
 
-	_ui.nextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), false));
-    _ui.prevButton->setIcon(theme->uiThemeIcon(QString("control-prev.svg"), false));
+	auto color = OwncloudSetupPage::palette().color(OwncloudSetupPage::backgroundRole()).lightness();
+	bool widgetHasDarkBg =
+        (OwncloudSetupPage::palette().color(OwncloudSetupPage::backgroundRole()).lightness() >= 125)
+        ? false
+        : true;
+	_ui.nextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), widgetHasDarkBg));
+    _ui.prevButton->setIcon(theme->uiThemeIcon(QString("control-prev.svg"), widgetHasDarkBg));
+
+	// QPushButtons are a mess when it comes to consistent background coloring without stylesheets,
+	// so we do it here even though this is an exceptional styling method here
+    _ui.createAccountButton->setStyleSheet("QPushButton {background-color: #0082C9; color: white}");
 
     _ui.slideShow->startShow();
 

File diff suppressed because it is too large
+ 0 - 0
theme/black/control-next.svg


File diff suppressed because it is too large
+ 0 - 0
theme/black/control-prev.svg


File diff suppressed because it is too large
+ 0 - 0
theme/white/control-next.svg


File diff suppressed because it is too large
+ 0 - 0
theme/white/control-prev.svg


Some files were not shown because too many files changed in this diff