die hardcoded colors, die!
svn path=/trunk/KDE/kdelibs/; revision=894466
This commit is contained in:
parent
dffbf7817c
commit
1d7144e6f7
@ -39,13 +39,14 @@
|
||||
#include <kstandarddirs.h>
|
||||
|
||||
#include <plasma/svg.h>
|
||||
#include <plasma/theme.h>
|
||||
|
||||
namespace Plasma
|
||||
{
|
||||
|
||||
class SignalPlotterPrivate
|
||||
{
|
||||
public:
|
||||
public:
|
||||
SignalPlotterPrivate()
|
||||
: svgBackground(0)
|
||||
{ }
|
||||
@ -54,6 +55,16 @@ class SignalPlotterPrivate
|
||||
{
|
||||
}
|
||||
|
||||
void themeChanged()
|
||||
{
|
||||
Plasma::Theme *theme = Plasma::Theme::defaultTheme();
|
||||
backgroundColor = theme->color(Theme::BackgroundColor);
|
||||
verticalLinesColor = theme->color(Theme::TextColor);
|
||||
verticalLinesColor.setAlphaF(0.4);
|
||||
horizontalLinesColor = theme->color(Theme::TextColor);
|
||||
horizontalLinesColor.setAlphaF(0.4);
|
||||
}
|
||||
|
||||
int precision;
|
||||
uint samples;
|
||||
uint bezierCurveOffset;
|
||||
@ -116,14 +127,12 @@ SignalPlotter::SignalPlotter(QGraphicsItem *parent)
|
||||
setMinimumSize(QSizeF(16, 16));
|
||||
|
||||
d->showVerticalLines = true;
|
||||
d->verticalLinesColor = QColor("black");
|
||||
d->verticalLinesDistance = 30;
|
||||
d->verticalLinesScroll = true;
|
||||
d->verticalLinesOffset = 0;
|
||||
d->horizontalScale = 1;
|
||||
|
||||
d->showHorizontalLines = true;
|
||||
d->horizontalLinesColor = QColor("black");
|
||||
d->horizontalLinesCount = 5;
|
||||
|
||||
d->showLabels = true;
|
||||
@ -132,7 +141,9 @@ SignalPlotter::SignalPlotter(QGraphicsItem *parent)
|
||||
d->fillPlots = true;
|
||||
|
||||
d->svgBackground = 0;
|
||||
d->backgroundColor = QColor(0, 0, 0);
|
||||
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), SLOT(themeChanged()));
|
||||
d->themeChanged();
|
||||
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
}
|
||||
|
@ -440,6 +440,7 @@ protected:
|
||||
|
||||
private:
|
||||
SignalPlotterPrivate *const d;
|
||||
Q_PRIVATE_SLOT(d, void themeChanged())
|
||||
};
|
||||
|
||||
} // Plasma namespace
|
||||
|
Loading…
Reference in New Issue
Block a user