Update preference colours when the application style is changed

In order to have matching colours in all the preferences, the individual
colour settings in Data Browser and SQL tabs are reset to default values
matching the corresponding style setting (dark stylesheet or follow desktop,
which could be dark or light as always).

Additionally, several problems with colour settings in QScintilla have
been fixed:
- We don't use indentation guides
- both sets of lexer colour settings must be used, otherwise the result is
inconsistant and unpredictable:
    * lexer->setDefaultColor|Paper and lexer->setColor|Paper
This commit is contained in:
mgrojo
2019-02-28 00:02:47 +01:00
parent e84589b12e
commit cc67969d73
6 changed files with 177 additions and 75 deletions

View File

@@ -509,6 +509,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>When this value is changed, all the other color preferences are also set to matching colors.</string>
</property>
<property name="currentIndex">
<number>0</number>
</property>
@@ -873,6 +876,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
@@ -899,6 +905,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
@@ -925,6 +934,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
@@ -941,6 +953,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
@@ -957,6 +972,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
@@ -973,6 +991,9 @@ Can be set to 0 for disabling completion.</string>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="toolTip">
<string>Click to set this color</string>
</property>
<property name="autoFillBackground">
<bool>true</bool>
</property>