mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user