]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
ShareDialog: show the error message in red
authorOlivier Goffart <ogoffart@woboq.com>
Mon, 2 May 2016 12:01:47 +0000 (14:01 +0200)
committerOlivier Goffart <ogoffart@woboq.com>
Mon, 2 May 2016 12:12:04 +0000 (14:12 +0200)
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
src/gui/sharelinkwidget.ui
src/gui/shareusergroupwidget.ui

index 7591b9357b2d5a91d6680939166dc1fba6dc48c3..86a4b1d276687dce941a0fc839e55538f7377a0f 100644 (file)
@@ -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();
 
 
index f320c719823b5523b7b2805725981dd93a52253a..d6585accc3561c706b0a7377b41a0ae4f7c302a5 100644 (file)
        <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>
index 44befbb7a4d269a7f68402a1bf8392cfd6a3bce9..79ca850f021aea6c6da1dbda68423633fedc3ae1 100644 (file)
    </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>