[Pkg-owncloud-commits] [owncloud-client] 434/470: ShareDialog: show the error message in red

Sandro Knauß hefee-guest at moszumanska.debian.org
Thu May 12 16:25:39 UTC 2016


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 3047682223ecb1ea9ee95cae953cfa8826267199
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Mon May 2 14:01:47 2016 +0200

    ShareDialog: show the error message in red
    
    Do the visual stuff from designer.
    The previous code that was ment to change the color in red did not work
    and changed it to gray instead.
    Also I don't see why there should be a frame.
    
    Issue #4773
---
 src/gui/sharelinkwidget.cpp     | 11 -----------
 src/gui/sharelinkwidget.ui      | 37 +++++++++++++++++++++++++++++++++++++
 src/gui/shareusergroupwidget.ui | 37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 74 insertions(+), 11 deletions(-)

diff --git a/src/gui/sharelinkwidget.cpp b/src/gui/sharelinkwidget.cpp
index 7591b93..86a4b1d 100644
--- a/src/gui/sharelinkwidget.cpp
+++ b/src/gui/sharelinkwidget.cpp
@@ -98,17 +98,6 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account,
         return;
     }
 
-    // error label, red box and stuff
-    _ui->errorLabel->setLineWidth(1);
-    _ui->errorLabel->setFrameStyle(QFrame::Plain);
-
-    QPalette errPalette = _ui->errorLabel->palette();
-    errPalette.setColor(QPalette::Active, QPalette::Base, QColor(0xaa, 0x4d, 0x4d));
-    errPalette.setColor(QPalette::Active, QPalette::WindowText, QColor(0xaa, 0xaa, 0xaa));
-
-    _ui->errorLabel->setPalette(errPalette);
-    _ui->errorLabel->setFrameShape(QFrame::Box);
-    _ui->errorLabel->setContentsMargins(QMargins(12,12,12,12));
     _ui->errorLabel->hide();
 
 
diff --git a/src/gui/sharelinkwidget.ui b/src/gui/sharelinkwidget.ui
index f320c71..d6585ac 100644
--- a/src/gui/sharelinkwidget.ui
+++ b/src/gui/sharelinkwidget.ui
@@ -36,6 +36,43 @@
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
+     <property name="palette">
+      <palette>
+       <active>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </active>
+       <inactive>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </inactive>
+       <disabled>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>123</red>
+           <green>121</green>
+           <blue>134</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </disabled>
+      </palette>
+     </property>
      <property name="text">
       <string>TextLabel</string>
      </property>
diff --git a/src/gui/shareusergroupwidget.ui b/src/gui/shareusergroupwidget.ui
index 44befbb..79ca850 100644
--- a/src/gui/shareusergroupwidget.ui
+++ b/src/gui/shareusergroupwidget.ui
@@ -27,6 +27,43 @@
    </item>
    <item>
     <widget class="QLabel" name="errorLabel">
+     <property name="palette">
+      <palette>
+       <active>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </active>
+       <inactive>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>255</red>
+           <green>0</green>
+           <blue>0</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </inactive>
+       <disabled>
+        <colorrole role="WindowText">
+         <brush brushstyle="SolidPattern">
+          <color alpha="255">
+           <red>123</red>
+           <green>121</green>
+           <blue>134</blue>
+          </color>
+         </brush>
+        </colorrole>
+       </disabled>
+      </palette>
+     </property>
      <property name="text">
       <string notr="true">Placeholder for Error text</string>
      </property>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list