summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-09 18:12:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-09 18:12:02 +0200
commit51b0e2bf53eb74b3041a98908ba32aaeaf4ed253 (patch)
tree7ffd4c58b4bdf79f15e7d05734ac572aed219f7c /qfunctionconfigurator/qfunctionconfigurator.cpp
parent1118434acb347988658370112c0e2e10aba6eec4 (diff)
use native background color in spline dialog
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.cpp')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index 0bd9aad0..802c0a1d 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -140,15 +140,14 @@ void QFunctionConfigurator::drawBackground(const QRectF &fullRect)
QRect scale;
_background = QPixmap(fullRect.width(), fullRect.height());
+ QColor bgColor = palette().color(QPalette::Normal, QPalette::Background);
QPainter painter(&_background);
-
- painter.save();
+ painter.fillRect(fullRect, bgColor);
painter.setRenderHint(QPainter::Antialiasing);
- painter.fillRect(fullRect, colBackground);
QColor bg_color(112, 154, 209);
painter.fillRect(range, bg_color);
- QFont font("ComicSans", 4);
+ QFont font;
font.setPointSize(8);
painter.setFont(font);
@@ -200,8 +199,6 @@ void QFunctionConfigurator::drawBackground(const QRectF &fullRect)
pen.setColor( Qt::black );
drawLine(&painter, range.topLeft() - QPointF(2,0), range.bottomLeft() - QPointF(2,0), pen);
drawLine(&painter, range.bottomLeft(), range.bottomRight(), pen);
-
- painter.restore();
}
@@ -628,11 +625,6 @@ void QFunctionConfigurator::setColorBezier(QColor color)
colBezier = color;
update();
}
-void QFunctionConfigurator::setColorBackground(QColor color)
-{
- colBackground = color;
- update();
-}
void QFunctionConfigurator::setInputEGU(QString egu)
{