Skip to content

Commit

Permalink
#5102 Another batch of new svg icons. Fixed Import/Export dialog with…
Browse files Browse the repository at this point in the history
… dark themes and made these dialogs unified across platforms, excluding need for side picture.
  • Loading branch information
pawelsalawa committed Dec 23, 2024
1 parent d941e34 commit af366bd
Show file tree
Hide file tree
Showing 46 changed files with 9,859 additions and 659 deletions.
1 change: 0 additions & 1 deletion Plugins/ConfigMigration/configmigrationwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ void ConfigMigrationWizard::accept()
void ConfigMigrationWizard::init()
{
ui->setupUi(this);
THEME_TUNER->darkThemeFix(this);

#ifdef Q_OS_MACX
resize(width() + 150, height());
Expand Down
7 changes: 5 additions & 2 deletions Plugins/ConfigMigration/configmigrationwizard.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
<property name="styleSheet">
<string notr="true">QTreeView::item {margin-top: 5px;}</string>
</property>
<property name="wizardStyle">
<enum>QWizard::WizardStyle::ClassicStyle</enum>
</property>
<property name="options">
<set>QWizard::NoDefaultButton</set>
<set>QWizard::WizardOption::NoDefaultButton</set>
</property>
<widget class="QWizardPage" name="itemsPage">
<property name="title">
Expand Down Expand Up @@ -83,7 +86,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand Down
2 changes: 0 additions & 2 deletions Plugins/FusionDarkStyle/fusiondarkplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ QPalette FusionDarkStyle::standardPalette() const
FusionDarkPlugin::FusionDarkPlugin(QObject *parent)
: QStylePlugin(parent)
{
ThemeTuner::registerQWizardThemeTuneRequired(STYLE_NAME);
}

FusionDarkPlugin::~FusionDarkPlugin()
{
ThemeTuner::deregisterQWizardThemeTuneRequired(STYLE_NAME);
}

QStyle *FusionDarkPlugin::create(const QString &key)
Expand Down
8 changes: 3 additions & 5 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@ ExportDialog::~ExportDialog()
void ExportDialog::init()
{
ui->setupUi(this);
THEME_TUNER->darkThemeFix(this);
limitDialogWidth(this);
DialogSizeHandler::applyFor(this);

#ifdef Q_OS_MACX
resize(width() + 150, height());
setPixmap(QWizard::BackgroundPixmap, addOpacity(ICONS.DATABASE_EXPORT_WIZARD.toQIcon().pixmap(800, 800), 0.3));
#endif

widgetCover = new WidgetCover(this);
Expand Down Expand Up @@ -194,7 +192,7 @@ void ExportDialog::initQueryPage()

connect(ui->queryEdit, SIGNAL(errorsChecked(bool)), ui->queryPage, SIGNAL(completeChanged()));
connect(ui->queryEdit, SIGNAL(textChanged()), ui->queryPage, SIGNAL(completeChanged()));
connect(ui->queryDatabaseCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateQueryEditDb()));
connect(ui->queryDatabaseCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateQueryEditDb()));
connect(this, SIGNAL(queryPageCompleteChanged()), ui->queryPage, SIGNAL(completeChanged()));
}

Expand All @@ -215,8 +213,8 @@ void ExportDialog::initDbObjectsPage()
return listOk;
});

connect(ui->dbObjectsDatabaseCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(updateDbObjTree()));
connect(ui->dbObjectsDatabaseCombo, SIGNAL(currentIndexChanged(QString)), ui->databaseObjectsPage, SIGNAL(completeChanged()));
connect(ui->dbObjectsDatabaseCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateDbObjTree()));
connect(ui->dbObjectsDatabaseCombo, SIGNAL(currentIndexChanged(int)), ui->databaseObjectsPage, SIGNAL(completeChanged()));
connect(selectableDbListModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), ui->databaseObjectsPage, SIGNAL(completeChanged()));
connect(ui->objectsSelectAllButton, SIGNAL(clicked()), this, SLOT(dbObjectsSelectAll()));
connect(ui->objectsDeselectAllButton, SIGNAL(clicked()), this, SLOT(dbObjectsDeselectAll()));
Expand Down
27 changes: 15 additions & 12 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/exportdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
<property name="windowTitle">
<string>Export</string>
</property>
<property name="wizardStyle">
<enum>QWizard::WizardStyle::ClassicStyle</enum>
</property>
<property name="options">
<set>QWizard::CancelButtonOnLeft|QWizard::NoDefaultButton</set>
<set>QWizard::WizardOption::CancelButtonOnLeft|QWizard::WizardOption::NoDefaultButton</set>
</property>
<widget class="QWizardPage" name="exportSubjectPage">
<property name="title">
Expand All @@ -24,10 +27,10 @@
<item>
<widget class="QFrame" name="exportSubjectFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
Expand Down Expand Up @@ -68,10 +71,10 @@
<item>
<widget class="QFrame" name="exportTableFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="1" column="2">
Expand Down Expand Up @@ -160,7 +163,7 @@
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
Expand Down Expand Up @@ -270,16 +273,16 @@
<string notr="true">#formatScrollArea { background: transparent; }</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
<enum>QFrame::Shape::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
<enum>QFrame::Shadow::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
Expand All @@ -289,8 +292,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>308</width>
<height>267</height>
<width>228</width>
<height>253</height>
</rect>
</property>
<property name="styleSheet">
Expand Down Expand Up @@ -403,7 +406,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand Down
2 changes: 0 additions & 2 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,11 @@ void ImportDialog::readStdConfig()
void ImportDialog::init()
{
ui->setupUi(this);
THEME_TUNER->darkThemeFix(this);
limitDialogWidth(this);
DialogSizeHandler::applyFor(this);

#ifdef Q_OS_MACX
resize(width() + 150, height());
setPixmap(QWizard::BackgroundPixmap, addOpacity(ICONS.DATABASE_IMPORT_WIZARD.toQIcon().pixmap(800, 800), 0.3));
#endif

initTablePage();
Expand Down
19 changes: 11 additions & 8 deletions SQLiteStudio3/guiSQLiteStudio/dialogs/importdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
<property name="windowTitle">
<string>Import data</string>
</property>
<property name="wizardStyle">
<enum>QWizard::WizardStyle::ClassicStyle</enum>
</property>
<property name="options">
<set>QWizard::CancelButtonOnLeft|QWizard::NoDefaultButton</set>
<set>QWizard::WizardOption::CancelButtonOnLeft|QWizard::WizardOption::NoDefaultButton</set>
</property>
<widget class="VerifiableWizardPage" name="tablePage">
<property name="title">
Expand All @@ -24,10 +27,10 @@
<item>
<widget class="QFrame" name="existingTableFrame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="3">
Expand Down Expand Up @@ -90,10 +93,10 @@
<string notr="true">#scrollArea { background: transparent; }</string>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
<enum>QFrame::Shape::NoFrame</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
<enum>Qt::ScrollBarPolicy::ScrollBarAlwaysOff</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
Expand All @@ -103,8 +106,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>269</width>
<height>280</height>
<width>179</width>
<height>253</height>
</rect>
</property>
<property name="styleSheet">
Expand Down Expand Up @@ -210,7 +213,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
Expand Down
5 changes: 2 additions & 3 deletions SQLiteStudio3/guiSQLiteStudio/iconmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class GUI_API_EXPORT IconManager : public QObject
DEF_ICON(COMPLETER_NO_VALUE, "completer_no_value")
DEF_ICON(COMPLETER_NUMBER, "completer_number")
DEF_ICON(COMPLETER_OPERATOR, "completer_operator")
DEF_ICON(COMPLETER_OTHER, "completer_other")
DEF_ICO3(COMPLETER_OTHER, COMPLETER_NO_VALUE)
DEF_ICON(COMPLETER_PRAGMA, "completer_pragma")
DEF_ICON(COMPLETER_STRING, "completer_string")
DEF_ICON(CONFIGURE, "configure")
Expand Down Expand Up @@ -84,8 +84,7 @@ class GUI_API_EXPORT IconManager : public QObject
DEF_ICON(DATABASE_DISCONNECT, "database_disconnect")
DEF_ICON(DATABASE_EDIT, "database_edit")
DEF_ICON(DATABASE_EXPORT, "database_export")
DEF_ICON(DATABASE_EXPORT_WIZARD, "database_export_wizard")
DEF_ICON(DATABASE_IMPORT_WIZARD, "database_import_wizard")
DEF_ICON(DATABASE_IMPORT, "database_import")
DEF_ICON(DATABASE_OFFLINE, "database_offline")
DEF_ICO2(DATABASE_INVALID, DATABASE_OFFLINE, WARNING)
DEF_ICO3(DATABASE_ONLINE, DATABASE)
Expand Down
34 changes: 16 additions & 18 deletions SQLiteStudio3/guiSQLiteStudio/icons.qrc
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
<RCC>
<qresource prefix="/icons">
<file>img/check.png</file>
<file>img/complete.png</file>
<file>img/completer_blob.png</file>
<file>img/completer_no_value.png</file>
<file>img/completer_number.png</file>
<file>img/completer_operator.png</file>
<file>img/completer_other.png</file>
<file>img/completer_pragma.png</file>
<file>img/completer_string.png</file>
<file>img/configure.png</file>
<file>img/database_connect.png</file>
<file>img/database_disconnect.png</file>
<file>img/database_export.png</file>
<file>img/database_reload.png</file>
<file>img/default.png</file>
<file>img/delete_row.png</file>
<file>img/delete_selected.png</file>
<file>img/delete_small.png</file>
<file>img/denied_small.png</file>
Expand All @@ -41,7 +28,6 @@
<file>img/indicator_info.png</file>
<file>img/indicator_warn.png</file>
<file>img/info_small.png</file>
<file>img/insert_row.png</file>
<file>img/insert_rows.png</file>
<file>img/keyword.png</file>
<file>img/loading.gif</file>
Expand All @@ -58,7 +44,6 @@
<file>img/pk.png</file>
<file>img/plus_small.png</file>
<file>img/question_small.png</file>
<file>img/reload.png</file>
<file>img/rename_fn_arg.png</file>
<file>img/results_below.png</file>
<file>img/results_in_tab.png</file>
Expand Down Expand Up @@ -141,9 +126,6 @@
<file>img/config_style.png</file>
<file>img/plugin.png</file>
<file>img/config_data_editors.png</file>
<file>img/database_export_wizard.svg</file>
<file>img/database_import_wizard.svg</file>
<file>img/database_offline.png</file>
<file>img/go_back.png</file>
<file>img/reset_autoincrement.png</file>
<file>img/erase_table_data.png</file>
Expand Down Expand Up @@ -219,5 +201,21 @@
<file>img/function.png</file>
<file>img/brick.svg</file>
<file>img/extensions.svg</file>
<file>img/delete_row.svg</file>
<file>img/insert_row.svg</file>
<file>img/database_connect.svg</file>
<file>img/database_disconnect.svg</file>
<file>img/database_export.svg</file>
<file>img/database_import.svg</file>
<file>img/database_offline.svg</file>
<file>img/database_reload.svg</file>
<file>img/reload.svg</file>
<file>img/complete.svg</file>
<file>img/completer_blob.svg</file>
<file>img/completer_number.svg</file>
<file>img/completer_operator.svg</file>
<file>img/completer_pragma.svg</file>
<file>img/completer_string.svg</file>
<file>img/completer_no_value.svg</file>
</qresource>
</RCC>
Loading

0 comments on commit af366bd

Please sign in to comment.