From a65ca7af57feaf7a4ea73f7e071a72eb9b3a1e24 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 7 Nov 2015 10:39:46 +0100 Subject: Refactored Painter. --- plugingui/window.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugingui/window.cc') diff --git a/plugingui/window.cc b/plugingui/window.cc index b9a1092..afbcb21 100644 --- a/plugingui/window.cc +++ b/plugingui/window.cc @@ -69,7 +69,7 @@ GUI::Window::Window() native = new NativeWindowPugl(this); #endif - eventhandler = new GUI::EventHandler(native, this); + eventhandler = new GUI::EventHandler(*native, *this); } GUI::Window::~Window() @@ -92,10 +92,9 @@ void GUI::Window::repaintEvent(GUI::RepaintEvent *e) { if(!visible()) return; - Painter p(this); - p.drawImageStretched(0,0, &back, width(), height()); - p.drawImage(width() - logo.width(), - height() - logo.height(), &logo); + Painter p(*this); + p.drawImageStretched(0,0, back, width(), height()); + p.drawImage(width() - logo.width(), height() - logo.height(), logo); } void GUI::Window::setFixedSize(int w, int h) -- cgit v1.2.3