Commit e3afe228 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Honor the setting for the editor background color

BUG:408344
parent 3381c656
......@@ -24,7 +24,6 @@
SvgRichTextCtrl::SvgRichTextCtrl(QWidget* parent /*= nullptr*/)
: QTextEdit(parent)
{
setStyleSheet("background-color:white");
}
void SvgRichTextCtrl::insertFromMimeData(const QMimeData *source)
......
......@@ -28,7 +28,6 @@ class SvgRichTextCtrl : public QTextEdit
{
public:
SvgRichTextCtrl(QWidget* parent = nullptr);
protected:
void insertFromMimeData(const QMimeData* source) override;
};
......
......@@ -985,6 +985,10 @@ void SvgTextEditor::applySettings()
QColor background = cfg.readEntry("colorEditorBackground", qApp->palette().background().color());
palette.setBrush(QPalette::Active, QPalette::Background, QBrush(background));
m_textEditorWidget.richTextEdit->setStyleSheet(QString("background-color:%1").arg(background.name()));
m_textEditorWidget.svgStylesEdit->setStyleSheet(QString("background-color:%1").arg(background.name()));
m_textEditorWidget.svgTextEdit->setStyleSheet(QString("background-color:%1").arg(background.name()));
QColor foreground = cfg.readEntry("colorEditorForeground", qApp->palette().text().color());
palette.setBrush(QPalette::Active, QPalette::Text, QBrush(foreground));
......@@ -996,6 +1000,8 @@ void SvgTextEditor::applySettings()
}
qobject_cast<KisFontComboBoxes*>(qobject_cast<QWidgetAction*>(actionCollection()->action("svg_font"))->defaultWidget())->refillComboBox(writingSystems);
m_page->setUpdatesEnabled(true);
}
......
......@@ -37,7 +37,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tabSvgTextEdit">
<attribute name="title">
......
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