summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2017-04-22 14:03:01 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2017-04-22 14:19:40 +0200
commit66420ea45b7d4f99820850a60273335f13f2bb28 (patch)
tree04c860635d6496a7cb6b93e9bff2ff7f7523c246
parent648e44f1e19531e9849a536d7589f918b58494b1 (diff)
Remove unnecessary painter clears.
-rw-r--r--plugingui/button.cc1
-rw-r--r--plugingui/checkbox.cc1
-rw-r--r--plugingui/combobox.cc2
-rw-r--r--plugingui/frame.cc1
-rw-r--r--plugingui/knob.cc2
-rw-r--r--plugingui/lineedit.cc1
-rw-r--r--plugingui/listbox.cc2
-rw-r--r--plugingui/listboxbasic.cc1
-rw-r--r--plugingui/listboxthin.cc2
-rw-r--r--plugingui/maintab.cc2
-rw-r--r--plugingui/mainwindow.cc1
-rw-r--r--plugingui/powerbutton.cc1
-rw-r--r--plugingui/progressbar.cc2
-rw-r--r--plugingui/slider.cc1
-rw-r--r--plugingui/statusframecontent.cc2
-rw-r--r--plugingui/tabbutton.cc2
-rw-r--r--plugingui/tabwidget.cc1
-rw-r--r--plugingui/textedit.cc1
18 files changed, 2 insertions, 24 deletions
diff --git a/plugingui/button.cc b/plugingui/button.cc
index 907b1a1..30bda82 100644
--- a/plugingui/button.cc
+++ b/plugingui/button.cc
@@ -46,7 +46,6 @@ Button::~Button()
void Button::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
-
p.clear();
int padTop = 3;
diff --git a/plugingui/checkbox.cc b/plugingui/checkbox.cc
index fc147d5..1893f59 100644
--- a/plugingui/checkbox.cc
+++ b/plugingui/checkbox.cc
@@ -42,7 +42,6 @@ CheckBox::CheckBox(Widget* parent)
void CheckBox::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
p.drawImage(
0, (knob.height() - bg_on.height()) / 2, state ? bg_on : bg_off);
diff --git a/plugingui/combobox.cc b/plugingui/combobox.cc
index 82fc6d1..6716fb1 100644
--- a/plugingui/combobox.cc
+++ b/plugingui/combobox.cc
@@ -99,8 +99,6 @@ void ComboBox::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
-
std::string _text = selectedName();
int w = width();
diff --git a/plugingui/frame.cc b/plugingui/frame.cc
index ed4a67b..9a2928c 100644
--- a/plugingui/frame.cc
+++ b/plugingui/frame.cc
@@ -53,7 +53,6 @@ FrameWidget::FrameWidget(Widget* parent, bool has_switch)
void FrameWidget::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
int center_x = width() / 2;
auto title_buf = title.c_str();
diff --git a/plugingui/knob.cc b/plugingui/knob.cc
index 7b76d2e..4082aa3 100644
--- a/plugingui/knob.cc
+++ b/plugingui/knob.cc
@@ -167,8 +167,8 @@ void Knob::repaintEvent(RepaintEvent* repaintEvent)
int center_y = height() / 2;
Painter p(*this);
-
p.clear();
+
p.drawImageStretched(0, 0, img_knob, diameter, diameter);
float range = maximum - minimum;
diff --git a/plugingui/lineedit.cc b/plugingui/lineedit.cc
index 7a8bb53..d2e9dea 100644
--- a/plugingui/lineedit.cc
+++ b/plugingui/lineedit.cc
@@ -202,7 +202,6 @@ void LineEdit::repaintEvent(RepaintEvent *repaintEvent)
{
Painter p(*this);
- p.clear();
int w = width();
int h = height();
if((w == 0) || (h == 0))
diff --git a/plugingui/listbox.cc b/plugingui/listbox.cc
index 15e4620..28c074e 100644
--- a/plugingui/listbox.cc
+++ b/plugingui/listbox.cc
@@ -84,8 +84,6 @@ void ListBox::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
-
int w = width();
int h = height();
if(w == 0 || h == 0)
diff --git a/plugingui/listboxbasic.cc b/plugingui/listboxbasic.cc
index 668d4d0..90e5b1a 100644
--- a/plugingui/listboxbasic.cc
+++ b/plugingui/listboxbasic.cc
@@ -142,7 +142,6 @@ void ListBoxBasic::onScrollBarValueChange(int value)
void ListBoxBasic::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
int w = width();
int h = height();
diff --git a/plugingui/listboxthin.cc b/plugingui/listboxthin.cc
index ce5bdbc..d224f11 100644
--- a/plugingui/listboxthin.cc
+++ b/plugingui/listboxthin.cc
@@ -80,8 +80,6 @@ void ListBoxThin::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
-
int w = width();
int h = height();
if(w == 0 || h == 0)
diff --git a/plugingui/maintab.cc b/plugingui/maintab.cc
index 98e06cc..49035d8 100644
--- a/plugingui/maintab.cc
+++ b/plugingui/maintab.cc
@@ -88,8 +88,6 @@ void MainTab::resize(std::size_t width, std::size_t height)
// DrumGizmo logo
Painter painter(*this);
- painter.clear();
-
painter.drawImage(width - logo.width(), height - logo.height(), logo);
}
diff --git a/plugingui/mainwindow.cc b/plugingui/mainwindow.cc
index 702178f..28f3395 100644
--- a/plugingui/mainwindow.cc
+++ b/plugingui/mainwindow.cc
@@ -81,7 +81,6 @@ void MainWindow::repaintEvent(RepaintEvent* repaintEvent)
}
Painter painter(*this);
- painter.clear();
auto bar_height = tabs.getBarHeight();
diff --git a/plugingui/powerbutton.cc b/plugingui/powerbutton.cc
index 85ef0a3..a91524f 100644
--- a/plugingui/powerbutton.cc
+++ b/plugingui/powerbutton.cc
@@ -38,7 +38,6 @@ PowerButton::PowerButton(Widget* parent) : Toggle(parent)
void PowerButton::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
if(state)
{
diff --git a/plugingui/progressbar.cc b/plugingui/progressbar.cc
index c7550c9..dd3e130 100644
--- a/plugingui/progressbar.cc
+++ b/plugingui/progressbar.cc
@@ -78,8 +78,6 @@ void ProgressBar::repaintEvent(RepaintEvent* repaintEvent)
int brd = 4;
int val = (width() - (2 * brd)) * progress;
- p.clear();
-
bar_bg.setSize(width(), height());
p.drawImage(0, 0, bar_bg);
diff --git a/plugingui/slider.cc b/plugingui/slider.cc
index bd28f81..dd2dc44 100644
--- a/plugingui/slider.cc
+++ b/plugingui/slider.cc
@@ -91,7 +91,6 @@ void Slider::setColour(Colour colour)
void Slider::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
auto inner_offset = (current_value / maximum) * getControlWidth();
auto button_x = button_offset + inner_offset - (button.width() / 2);
diff --git a/plugingui/statusframecontent.cc b/plugingui/statusframecontent.cc
index 928aeaa..4bd02d2 100644
--- a/plugingui/statusframecontent.cc
+++ b/plugingui/statusframecontent.cc
@@ -76,7 +76,7 @@ void StatusframeContent::updateContent()
"Drumkit description: " + drumkit_description + "\n"
"Drumkit version: " + drumkit_version + "\n"
"Drumkit samplerate: " + drumkit_samplerate + "\n"
- "Samplerate: " + samplerate + "\n"
+ "Session samplerate: " + samplerate + "\n"
"Resampling enabled: " + resampling_enabled + "\n"
"Resampling active: " + resampling_active + "\n"
"Number of underruns: " + number_of_underruns + "\n"
diff --git a/plugingui/tabbutton.cc b/plugingui/tabbutton.cc
index 56552c0..f46daa4 100644
--- a/plugingui/tabbutton.cc
+++ b/plugingui/tabbutton.cc
@@ -81,8 +81,6 @@ void TabButton::repaintEvent(RepaintEvent* e)
{
Painter p(*this);
- p.clear();
-
int padTop = 3;
int padLeft = 0;
int padTextTop = 3;
diff --git a/plugingui/tabwidget.cc b/plugingui/tabwidget.cc
index 5082b5b..06e7425 100644
--- a/plugingui/tabwidget.cc
+++ b/plugingui/tabwidget.cc
@@ -84,7 +84,6 @@ void TabWidget::sizeChanged(int width, int height)
std::size_t logo_padding_right = button_padding_left / 2;
Painter p(*this);
- p.clear();
if(buttons.size() > 0)
{
diff --git a/plugingui/textedit.cc b/plugingui/textedit.cc
index abfb3ab..aee8e13 100644
--- a/plugingui/textedit.cc
+++ b/plugingui/textedit.cc
@@ -134,7 +134,6 @@ void TextEdit::preprocessText()
void TextEdit::repaintEvent(RepaintEvent* repaintEvent)
{
Painter p(*this);
- p.clear();
// update values of scroll bar
scroll.setRange(height() / font.textHeight());