diff options
| author | Christoph Berg <myon@debian.org> | 2021-01-05 22:10:30 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-01-05 22:10:30 +0100 |
| commit | 8e43a898258cdf4a3eaec64f06069017b2d24a4d (patch) | |
| tree | 82cfd1cbc20f8a219522a8036e8a3622eec44440 /widgets/colorhighlighting.cpp | |
| parent | a42d3323808f2f57138c4a636db7f9f78c30c59f (diff) | |
| parent | 061dc1a349738747489ef0c0ebeeb4443e369501 (diff) | |
Update upstream source from tag 'upstream/2.3.0_rc3+repack'
Update to upstream version '2.3.0~rc3+repack'
with Debian dir 5129b722b4b0bb33d8e8b0c41dd5606650a3ee38
Diffstat (limited to 'widgets/colorhighlighting.cpp')
| -rw-r--r-- | widgets/colorhighlighting.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/widgets/colorhighlighting.cpp b/widgets/colorhighlighting.cpp index 6ad0bd4d..e7e9dedd 100644 --- a/widgets/colorhighlighting.cpp +++ b/widgets/colorhighlighting.cpp @@ -1,7 +1,7 @@ #include "colorhighlighting.h" #include <QApplication> -#include <QDebug> +#include <QString> #include "SettingsGroup.hpp" #include "models/DecodeHighlightingModel.hpp" @@ -113,16 +113,16 @@ void ColorHighlighting::set_items (DecodeHighlightingModel const& highlighting_m default: continue; } - auto palette = example->parentWidget ()->palette (); + auto style_sheet = example->parentWidget ()->styleSheet (); if (Qt::NoBrush != item.background_.style ()) { - palette.setColor (QPalette::Window, item.background_.color ()); + style_sheet += QString {"; background-color: #%1"}.arg (item.background_.color ().rgb (), 8, 16, QLatin1Char {'0'}); } if (Qt::NoBrush != item.foreground_.style ()) { - palette.setColor (QPalette::WindowText, item.foreground_.color ()); + style_sheet += QString {"; color: #%1"}.arg (item.foreground_.color ().rgb (), 8, 16, QLatin1Char {'0'}); } - example->setPalette (palette); + example->setStyleSheet (style_sheet); example->setEnabled (item.enabled_); label->setText (DecodeHighlightingModel::highlight_name (item.type_)); label->setEnabled (item.enabled_); |
