From 166e3df8501e040362f7ac7bb1322360cfb24e2a Mon Sep 17 00:00:00 2001 From: Torsten Paul Date: Fri, 9 Jan 2015 18:20:07 +0100 Subject: [PATCH] Remove setting the font size for the warning/error bar. --- src/MainWindow.h | 2 +- src/MainWindow.ui | 78 +++++++++++++++++++++++++++-------------------- src/mainwin.cc | 9 +++--- 3 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/MainWindow.h b/src/MainWindow.h index dc5c8140..f753bdfe 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -205,7 +205,7 @@ public slots: void actionReloadRenderPreview(); void on_editorDock_visibilityChanged(bool); void on_consoleDock_visibilityChanged(bool); - void on_pushButtonCompileResultClose_clicked(); + void on_toolButtonCompileResultClose_clicked(); void editorTopLevelChanged(bool); void consoleTopLevelChanged(bool); #ifdef ENABLE_OPENCSG diff --git a/src/MainWindow.ui b/src/MainWindow.ui index e316e56b..22740ec6 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -45,37 +45,18 @@ 9 + + 9 + - 2 + 9 - 2 + 6 + + + 4 - - - - - 0 - 0 - - - - - 26 - 26 - - - - - - - :/icons/information-icons-error.png - - - true - - - @@ -86,7 +67,6 @@ - 14 75 true @@ -97,7 +77,10 @@ - + + + + @@ -105,11 +88,43 @@ :/icons/close.png:/icons/close.png - + + + 22 + 22 + + + + Qt::ToolButtonIconOnly + + true + + + + QToolButton { border: none; } + + + + + + + :/icons/information-icons-error.png:/icons/information-icons-error.png + + + + 22 + 22 + + + + false + + + @@ -874,9 +889,6 @@ Show Scale Markers - diff --git a/src/mainwin.cc b/src/mainwin.cc index 123bfd4d..014a5f13 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -957,7 +957,7 @@ void MainWindow::waitAfterReload() } } -void MainWindow::on_pushButtonCompileResultClose_clicked() +void MainWindow::on_toolButtonCompileResultClose_clicked() { frameCompileResult->hide(); } @@ -977,10 +977,11 @@ void MainWindow::updateCompileResult() QFileInfo fileInfo(fileName); msg = QString(_("Error while compiling '%1'.")).arg(fileInfo.fileName()); } - labelCompileResultIcon->setPixmap(QPixmap(QString::fromUtf8(":/icons/information-icons-error.png"))); + toolButtonCompileResultIcon->setIcon(QIcon(QString::fromUtf8(":/icons/information-icons-error.png"))); } else { - msg = QString(_("Compilation generated %1 warnings.")).arg(compileWarnings); - labelCompileResultIcon->setPixmap(QPixmap(QString::fromUtf8(":/icons/information-icons-warning.png"))); + const char *fmt = ngettext("Compilation generated %1 warning.", "Compilation generated %1 warnings.", compileWarnings); + msg = QString(fmt).arg(compileWarnings); + toolButtonCompileResultIcon->setIcon(QIcon(QString::fromUtf8(":/icons/information-icons-warning.png"))); } msg += _(" For details see console window."); labelCompileResultMessage->setText(msg);