New setting allowing to set a dark style using a style-sheet

A new setting allows to follow the system style or set a new dark style
based on a the style-sheet provided by
https://github.com/ColinDuquesnoy/QDarkStyleSheet
The style-sheet is licensed under the MIT license. Images contained in
that project are licensed under CC-BY license.

Pending issues:

- Use of stylesheets is incompatible to QPalette. Some colours for
previewing settings in the Preferences dialog are eclipsed by the style-
sheet
See https://github.com/ColinDuquesnoy/QDarkStyleSheet/issues/48

- Changing the style should select matching background and foreground
colours for the Browse Data and SQL tabs in Preferences.

See issues #1751 #1493 and #1738
This commit is contained in:
mgrojo
2019-02-22 22:15:19 +01:00
parent a7a50c5e4c
commit ed178689a4
50 changed files with 2084 additions and 18 deletions

View File

@@ -122,7 +122,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="labelToolbarStyle">
<property name="text">
<string>Toolbar style</string>
@@ -132,7 +132,7 @@
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QComboBox" name="toolbarStyleComboMain">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -182,7 +182,7 @@
</item>
</widget>
</item>
<item row="5" column="1">
<item row="6" column="1">
<widget class="QComboBox" name="toolbarStyleComboStructure">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -232,7 +232,7 @@
</item>
</widget>
</item>
<item row="6" column="1">
<item row="7" column="1">
<widget class="QComboBox" name="toolbarStyleComboBrowse">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -282,7 +282,7 @@
</item>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="QComboBox" name="toolbarStyleComboSql">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -332,7 +332,7 @@
</item>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QLabel" name="labelUseRemotes">
<property name="text">
<string>Show remote options</string>
@@ -342,7 +342,7 @@
</property>
</widget>
</item>
<item row="9" column="1">
<item row="10" column="1">
<widget class="QCheckBox" name="checkUseRemotes">
<property name="text">
<string>enabled</string>
@@ -352,7 +352,7 @@
</property>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QLabel" name="labelUpdates">
<property name="text">
<string>Automatic &amp;updates</string>
@@ -362,14 +362,14 @@
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<widget class="QCheckBox" name="checkUpdates">
<property name="text">
<string>enabled</string>
</property>
</widget>
</item>
<item row="11" column="0">
<item row="12" column="0">
<widget class="QLabel" name="label_16">
<property name="text">
<string>DB file extensions</string>
@@ -379,14 +379,14 @@
</property>
</widget>
</item>
<item row="11" column="1">
<item row="12" column="1">
<widget class="QPushButton" name="buttonManageFileExtension">
<property name="text">
<string>Manage</string>
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="labelMainToolBar">
<property name="text">
<string>Main Window</string>
@@ -399,7 +399,7 @@
</property>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QLabel" name="labelStructureToolBar">
<property name="text">
<string>Database Structure</string>
@@ -412,7 +412,7 @@
</property>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QLabel" name="labelBrowseToolBar">
<property name="text">
<string>Browse Data</string>
@@ -425,7 +425,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QLabel" name="labelSqlToolBar">
<property name="text">
<string>Execute SQL</string>
@@ -438,7 +438,7 @@
</property>
</widget>
</item>
<item row="8" column="1">
<item row="9" column="1">
<widget class="QComboBox" name="toolbarStyleComboEditCell">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
@@ -488,7 +488,7 @@
</item>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QLabel" name="labelEditCellToolBar">
<property name="text">
<string>Edit Database Cell</string>
@@ -501,6 +501,51 @@
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="appStyleCombo">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
<property name="minimumContentsLength">
<number>35</number>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>15</height>
</size>
</property>
<item>
<property name="text">
<string>Follow the desktop style</string>
</property>
</item>
<item>
<property name="text">
<string>Dark style</string>
</property>
</item>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="labelAppStyle">
<property name="text">
<string>Application style</string>
</property>
<property name="buddy">
<cstring>toolbarStyleComboStructure</cstring>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">