diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2016-05-02 15:01:47 +0300 |
---|---|---|
committer | Olivier Goffart <ogoffart@woboq.com> | 2016-05-02 15:12:04 +0300 |
commit | 3047682223ecb1ea9ee95cae953cfa8826267199 (patch) | |
tree | f3c636269341c50044a0b85503c80f08f56040f8 /src | |
parent | c91dd94728a438286ad48b97c4b41a06e5c31d39 (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/sharelinkwidget.cpp | 11 | ||||
-rw-r--r-- | src/gui/sharelinkwidget.ui | 37 | ||||
-rw-r--r-- | 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 7591b9357..86a4b1d27 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 f320c7198..d6585accc 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 44befbb7a..79ca850f0 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> |