mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-05-24 22:48:23 -05:00
New setting for configuring brace matching background
This allows modifying this background colour and provides a better default, which does not make the cursor invisible (in dark mode) and it is itself visible outside of the current line (in light mode). See issues #2203 and #2320
This commit is contained in:
@@ -144,6 +144,8 @@ void ExtendedScintilla::reloadCommonSettings()
|
||||
}
|
||||
setPaper(Settings::getValue("syntaxhighlighter", "background_colour").toString());
|
||||
setColor(Settings::getValue("syntaxhighlighter", "foreground_colour").toString());
|
||||
setMatchedBraceBackgroundColor(Settings::getValue("syntaxhighlighter", "highlight_colour").toString());
|
||||
|
||||
}
|
||||
|
||||
void ExtendedScintilla::reloadKeywords()
|
||||
|
||||
@@ -122,7 +122,7 @@ void PreferencesDialog::loadSettings()
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setForeground(2, color);
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setBackground(2, color);
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setText(2, colorname);
|
||||
if (name != "null" && name != "currentline" && name != "background" && name != "foreground") {
|
||||
if (name != "null" && name != "currentline" && name != "background" && name != "foreground" && name != "highlight") {
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(3, Settings::getValue("syntaxhighlighter", name + "_bold").toBool() ? Qt::Checked : Qt::Unchecked);
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(4, Settings::getValue("syntaxhighlighter", name + "_italic").toBool() ? Qt::Checked : Qt::Unchecked);
|
||||
ui->treeSyntaxHighlighting->topLevelItem(i)->setCheckState(5, Settings::getValue("syntaxhighlighter", name + "_underline").toBool() ? Qt::Checked : Qt::Unchecked);
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>755</width>
|
||||
<height>594</height>
|
||||
<height>601</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -1293,6 +1293,14 @@ Can be set to 0 for disabling completion.</string>
|
||||
<string>Foreground</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>highlight</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Highlight</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -448,6 +448,8 @@ QColor Settings::getDefaultColorValue(const std::string& group, const std::strin
|
||||
return QColor(Qt::lightGray);
|
||||
else if(name == "currentline_colour")
|
||||
return backgroundColour.lighter(150);
|
||||
else if(name == "highlight_colour")
|
||||
return QColor(79, 148, 205);
|
||||
} else {
|
||||
if(name == "keyword_colour")
|
||||
return QColor(Qt::darkBlue);
|
||||
@@ -463,6 +465,8 @@ QColor Settings::getDefaultColorValue(const std::string& group, const std::strin
|
||||
return QColor(Qt::red);
|
||||
else if(name == "currentline_colour")
|
||||
return QColor(236, 236, 245);
|
||||
else if(name == "highlight_colour")
|
||||
return QColor(Qt::cyan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user