Tue, 09 Apr 2013 18:16:01 +0300
Touched up the error icon, show the error icon in the set contents dialog if the contents are gibberish.
--- a/zz_setContentsDialog.cpp Tue Apr 09 18:07:57 2013 +0300 +++ b/zz_setContentsDialog.cpp Tue Apr 09 18:16:01 2013 +0300 @@ -43,6 +43,11 @@ qErrorLabel = new QLabel; qErrorLabel->setText (str::mkfmt ("<span style=\"color: #900\">%s</span>", static_cast<LDGibberish*> (obj)->zReason.chars())); + + QPixmap qErrorPixmap = QPixmap ("icons/error.png").scaledToHeight (16); + + qErrorIcon = new QLabel; + qErrorIcon->setPixmap (qErrorPixmap); } IMPLEMENT_DIALOG_BUTTONS @@ -53,8 +58,10 @@ QHBoxLayout* layout2 = new QHBoxLayout; - if (obj->getType() == OBJ_Gibberish) + if (obj->getType() == OBJ_Gibberish) { + layout2->addWidget (qErrorIcon); layout2->addWidget (qErrorLabel); + } layout2->addWidget (qButtons); layout->addLayout (layout2);
--- a/zz_setContentsDialog.h Tue Apr 09 18:07:57 2013 +0300 +++ b/zz_setContentsDialog.h Tue Apr 09 18:16:01 2013 +0300 @@ -31,7 +31,7 @@ // ============================================================================= class SetContentsDialog : public QDialog { public: - QLabel* qContentsLabel, *qErrorLabel; + QLabel* qContentsLabel, *qErrorIcon, *qErrorLabel; QLineEdit* qContents; QDialogButtonBox* qButtons;