Some minor UI improvements

* buttons right aligned
* min-height in qss
* removed "public slots" where not needed
* QMessageBox when changing widget style (because it is so slow)
This commit is contained in:
Klaus Basan
2018-01-18 03:06:42 +01:00
parent 8273a9881f
commit b574ede2e2
8 changed files with 187 additions and 115 deletions

View File

@@ -16,6 +16,7 @@
#include <QFont>
#include <QFontComboBox>
#include <QStyleFactory>
#include <QMessageBox>
using namespace BlackMisc;
using namespace BlackGui::Settings;
@@ -98,6 +99,17 @@ namespace BlackGui
{
const CGeneralGuiSettings settings = m_guiSettings.getThreadLocal();
if (!settings.isDifferentValidWidgetStyle(widgetStyle)) { return; }
const int ret = QMessageBox::information(this,
tr("Change style?"),
tr("Changing style is slow.\nThe GUI will hang for some seconds.\nDo you want to save your changes?"),
QMessageBox::Ok | QMessageBox::Cancel);
if (ret != QMessageBox::Ok)
{
ui->cb_SettingsGuiWidgetStyle->setCurrentText(settings.getWidgetStyle());
return;
}
if (sGui->getIContextNetwork() && sGui->getIContextNetwork()->isConnected())
{
// Style changes freeze the GUI, must not be done in flight mode