diff options
-rw-r--r-- | plugingui/powerwidget.cc | 2 | ||||
-rw-r--r-- | test/paintertest.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugingui/powerwidget.cc b/plugingui/powerwidget.cc index db37561..71ad74b 100644 --- a/plugingui/powerwidget.cc +++ b/plugingui/powerwidget.cc @@ -119,7 +119,7 @@ PowerWidget::Canvas::Canvas(dggui::Widget* parent, void PowerWidget::Canvas::repaintEvent(dggui::RepaintEvent *repaintEvent) { - if(width() < 1 || height() < 1) + if(width() < 4 || height() < 4) { return; } diff --git a/test/paintertest.cc b/test/paintertest.cc index 5a1c44a..10b96dc 100644 --- a/test/paintertest.cc +++ b/test/paintertest.cc @@ -91,7 +91,7 @@ public: has_alpha = alpha; image_data.resize(_width * _height); - image_data_raw.resize(_width * _height); + image_data_raw.resize(4 * _width * _height); // Store x and y coordinates as red and green colour components for(std::uint8_t x = 0; x < _width; ++x) |