Commit b78d6800 authored by Thomas Eschenbacher's avatar Thomas Eschenbacher
Browse files

replaced some deprecated functions:

- QColor::dark()           -> QColor::darker()
- QColor::light()          -> QColor::lighter()
- QPalette::background()   -> QPalette::window()
- QPainter::rawRoundRect() -> QPainter::drawRoundedRect()
parent 22b03c57
......@@ -73,14 +73,15 @@ Kwave::Splash::Splash(const QString &PNGFile)
const int x = w - 10 - tw;
const int y = h - 10 - th;
const QBrush brush(palette().background().color());
const QBrush brush(palette().window().color());
p.setBrush(brush);
p.setOpacity(0.50);
p.setPen(Qt::NoPen);
p.drawRoundRect(
p.drawRoundedRect(
x - r, y - r,
tw + 2 * r, th + (2 * r),
(200 * r) / th, (200 * r) / th
(200 * r) / th, (200 * r) / th,
Qt::RelativeSize
);
p.setOpacity(1.0);
......
......@@ -29,8 +29,8 @@ Kwave::Colors::ColorSet Kwave::Colors::Normal =
Kwave::Colors::ColorSet Kwave::Colors::Disabled =
{
/* background : */ QColor(Qt::darkGray).darker(300),
/* sample : */ Kwave::Colors::Normal.sample.dark(),
/* interpolated : */ Kwave::Colors::Normal.interpolated.dark(),
/* sample : */ Kwave::Colors::Normal.sample.darker(),
/* interpolated : */ Kwave::Colors::Normal.interpolated.darker(),
/* zero : */ Qt::darkGreen,
/* zero_unused : */ Qt::black
};
......
......@@ -816,7 +816,7 @@ void Kwave::SignalView::PositionWidget::updateMask()
void Kwave::SignalView::PositionWidget::paintEvent(QPaintEvent *)
{
QPainter p(this);
p.setBrush(palette().background().color());
p.setBrush(palette().window().color());
p.drawPolygon(m_polygon);
}
......
......@@ -287,7 +287,7 @@ void Kwave::LevelMeter::drawScale(QPainter &p)
int db = 0;
int right = width();
const QColor textcolor = palette().buttonText().color();
const QBrush brush(palette().background().color());
const QBrush brush(palette().window().color());
Q_ASSERT(th);
if (!th) return;
......@@ -314,8 +314,12 @@ void Kwave::LevelMeter::drawScale(QPainter &p)
// dim the text background area
p.setOpacity(0.66);
p.setPen(Qt::NoPen);
p.drawRoundRect(x - r, y - r, text_width + 2 * r, th + 2 * r,
(200 * r) / th, (200 * r) / th);
p.drawRoundedRect(
x - r , y - r,
text_width + 2 * r , th + 2 * r,
(200 * r) / th , (200 * r) / th,
Qt::RelativeSize
);
// draw the text, right/center aligned
p.setOpacity(1.0);
......@@ -354,7 +358,7 @@ void Kwave::LevelMeter::drawContents()
p.begin(this);
// fill the background
p.fillRect(rect(), palette().background().color());
p.fillRect(rect(), palette().window().color());
const unsigned int border = 4;
const unsigned int cell = 3;
......@@ -380,7 +384,7 @@ void Kwave::LevelMeter::drawContents()
border + cell + i,
border + (track * h),
cell, h-border,
(i > fast) ? color.dark() : color
(i > fast) ? color.darker() : color
);
}
......@@ -398,7 +402,7 @@ void Kwave::LevelMeter::drawContents()
border + cell + peak,
border + (track * h),
cell, h - border,
peak_color.light()
peak_color.lighter()
);
}
......
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