summaryrefslogtreecommitdiffhomepage
path: root/spline/spline-widget.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-27 14:08:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-27 16:43:04 +0200
commit8f8014bf7178c6c06d5bb1760ba6619f161d1ac6 (patch)
treed937df5b46ae3e81b03458ddaca8167896a2b2db /spline/spline-widget.cpp
parent52e73f03f27104c094a9b8e66076a9c593a3c869 (diff)
spline/widget: try fix background color on Unix
Diffstat (limited to 'spline/spline-widget.cpp')
-rw-r--r--spline/spline-widget.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/spline/spline-widget.cpp b/spline/spline-widget.cpp
index 68d009c5..67751840 100644
--- a/spline/spline-widget.cpp
+++ b/spline/spline-widget.cpp
@@ -101,7 +101,7 @@ void spline_widget::drawBackground()
QPainter painter(&_background);
- painter.fillRect(rect(), palette().background().color());
+ painter.fillRect(rect(), widget_bg_color);
{
QColor bg_color(112, 154, 209);
@@ -253,15 +253,13 @@ void spline_widget::drawFunction()
}
#endif
- const QColor bg = palette().background().color();
-
const QRect r1(pixel_bounds.left(), 0, width() - pixel_bounds.left(), pixel_bounds.top()),
r2(pixel_bounds.right(), 0, width() - pixel_bounds.right(), pixel_bounds.bottom());
// prevent topward artifacts the lazy way
- painter.fillRect(r1, bg);
+ painter.fillRect(r1, widget_bg_color);
// same for rightward artifacts
- painter.fillRect(r2, bg);
+ painter.fillRect(r2, widget_bg_color);
const int alpha = !isEnabled() ? 64 : 120;
if (!_preview_only)