Commit 7bc8a545 authored by Jan Paul Batrina's avatar Jan Paul Batrina
Browse files

[ColorPicker] Tweak default config

Named colors (e.g. skyblue) are now disabled by default since
they tend to look out of place for most file types.

The color previews now have a 1px padding.
parent 6e3e25f4
......@@ -116,7 +116,7 @@ void KateColorPickerConfigPage::apply()
void KateColorPickerConfigPage::reset()
{
KConfigGroup config(KSharedConfig::openConfig(), "ColorPicker");
chkNamedColors->setChecked(config.readEntry("NamedColors", true));
chkNamedColors->setChecked(config.readEntry("NamedColors", false));
chkPreviewAfterColor->setChecked(config.readEntry("PreviewAfterColor", true));
QList<int> enabledHexLengths = config.readEntry("HexLengths", QList<int>{12, 9, 8, 6, 3});
......
......@@ -103,7 +103,7 @@ void ColorPickerInlineNoteProvider::updateColorMatchingCriteria()
colorRegex = colorRegex.arg(hexRegex.join(QLatin1String("|")));
}
if (config.readEntry("NamedColors", true)) {
if (config.readEntry("NamedColors", false)) {
if (!colorRegex.isEmpty()) {
colorRegex = QStringLiteral("(%1)|").arg(colorRegex);
}
......@@ -185,7 +185,7 @@ QVector<int> ColorPickerInlineNoteProvider::inlineNotes(int line) const
QSize ColorPickerInlineNoteProvider::inlineNoteSize(const KTextEditor::InlineNote &note) const
{
return QSize(note.lineHeight(), note.lineHeight());
return QSize(note.lineHeight()-1, note.lineHeight()-1);
}
void ColorPickerInlineNoteProvider::paintInlineNote(const KTextEditor::InlineNote &note, QPainter &painter) const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment