Skip to content

Commit

Permalink
Remove styling from error message in 'New Account' wizard
Browse files Browse the repository at this point in the history
In dark mode, white text on a light-red background is very hard to read.
Now the warning icon is shown, and the error text is shown in bold, but
otherwise no styling (esp. coloring) is done.

Fixes: #11547
  • Loading branch information
erikjv committed Mar 20, 2024
1 parent 341a0fe commit a009dea
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/gui/newwizard/setupwizardwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ void SetupWizardWindow::slotHideErrorMessageWidget()

void SetupWizardWindow::showErrorMessage(const QString &errorMessage)
{
_ui->errorMessageLabel->setText(errorMessage);
_ui->errorMessageLabel->setText(QStringLiteral("<b>%1</b>").arg(errorMessage));
_ui->errorMessageLabel->setWordWrap(true);
_ui->errorMessageWidget->show();
}
Expand Down
47 changes: 34 additions & 13 deletions src/gui/newwizard/setupwizardwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,44 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">background-color: #ff7070;</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,0">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1,0">
<item>
<widget class="QLabel" name="warningPixmap">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../../resources/client.qrc">:/client/resources/light/warning.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="errorMessageLabel">
<property name="text">
<string notr="true">error message placeholder</string>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="errorMessageDismissButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Dismiss</string>
</property>
Expand Down Expand Up @@ -164,6 +183,8 @@
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<resources>
<include location="../../resources/client.qrc"/>
</resources>
<connections/>
</ui>

0 comments on commit a009dea

Please sign in to comment.