Added slight svg transparency as requested in ref issue, fixed bg detection logic
authorDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Fri, 13 Sep 2019 18:38:03 +0000 (20:38 +0200)
committerDominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
Fri, 13 Sep 2019 18:38:03 +0000 (20:38 +0200)
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
src/gui/wizard/owncloudsetuppage.cpp
theme/black/control-next.svg
theme/black/control-prev.svg
theme/white/control-next.svg
theme/white/control-prev.svg

index 03a68e408256306322016b44f015d29f2ec69278..8ea29039611841d5cf1a2a86c124705320a3a606 100644 (file)
@@ -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();
 
index 05886b8735d59d8f17e724a1b72c14d93d6156c7..19c7d0159bba7b1515a14f2144b6dfcaa8462404 100644 (file)
@@ -3,7 +3,7 @@
 <svg width="100%" height="100%" viewBox="0 0 18 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
     <g transform="matrix(1,0,0,1,-7.28829,-1.57657)">
         <g transform="matrix(1,0,0,1,-5.71171,-3.55271e-15)">
-            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z"/>
+            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill-opacity:0.6;"/>
         </g>
     </g>
 </svg>
index 11fb0fb96349ac628029c63d3e98c6912a3147e8..97fe7a90dfa37413b97a13537cc1d73311b80bb5 100644 (file)
@@ -3,7 +3,7 @@
 <svg width="100%" height="100%" viewBox="0 0 18 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
     <g transform="matrix(1,0,0,1,-7.28829,-1.57657)">
         <g transform="matrix(-1,0,0,1,37.7117,-3.55271e-15)">
-            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z"/>
+            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill-opacity:0.6;"/>
         </g>
     </g>
 </svg>
index 097c5ee0c5da8f9040f08e58fee6d5eeaf00ac03..9194dbe6ee8f1b17fe2a4deaa85daad5c1bfa77b 100644 (file)
@@ -3,7 +3,7 @@
 <svg width="100%" height="100%" viewBox="0 0 18 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
     <g transform="matrix(1,0,0,1,-7.28829,-1.57657)">
         <g transform="matrix(1,0,0,1,-5.71171,-3.55271e-15)">
-            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill:white;"/>
+            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill:white;fill-opacity:0.6;"/>
         </g>
     </g>
 </svg>
index 348b4482fdf1b403a1ed2c77dbb566f6827ffa1a..e3a32259475dbd3bbb301e83119effc5775ffa1d 100644 (file)
@@ -3,7 +3,7 @@
 <svg width="100%" height="100%" viewBox="0 0 18 29" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
     <g transform="matrix(1,0,0,1,-7.28829,-1.57657)">
         <g transform="matrix(-1,0,0,1,37.7117,-3.55271e-15)">
-            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill:white;"/>
+            <path d="M13.424,5.001C13.19,4.767 13.19,4.387 13.424,4.152C13.995,3.581 15.005,2.572 15.576,2.001C15.81,1.767 16.19,1.767 16.424,2.001C18.491,4.068 27.501,13.078 29.858,15.434C30.008,15.584 30.092,15.788 30.092,16C30.092,16.212 30.008,16.416 29.858,16.566C27.501,18.922 18.491,27.932 16.424,29.999C16.19,30.233 15.81,30.233 15.576,29.999C15.005,29.428 13.995,28.419 13.424,27.848C13.19,27.613 13.19,27.233 13.424,26.999C15.493,24.93 24.423,16 24.423,16C24.423,16 15.493,7.07 13.424,5.001Z" style="fill:white;fill-opacity:0.6;"/>
         </g>
     </g>
 </svg>