From c4f69d2af7d995eb0dd4592c18dc2f6b930bd193 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 19 Oct 2013 11:20:12 +0200 Subject: Make window fixed size. --- plugingui/window.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'plugingui/window.cc') diff --git a/plugingui/window.cc b/plugingui/window.cc index 0d11b17..41d4d82 100644 --- a/plugingui/window.cc +++ b/plugingui/window.cc @@ -92,16 +92,23 @@ void GUI::Window::repaintEvent(GUI::RepaintEvent *e) height() - logo.height(), &logo); } +void GUI::Window::setFixedSize(int w, int h) +{ + native->setFixedSize(w, h); + resize(w,h); +} + void GUI::Window::resize(int width, int height) { if(width < 1 || height < 1) return; -#ifdef WIN32 + // This needs to be done on all platoforms when setFixedSize is introduced. + //#ifdef WIN32 // Fix to force buffer size reallocation // FIXME: This should've been done indirectly through a WM_SIZE message in the // EventHandler... resized(width, height); -#endif + //#endif native->resize(width, height); Widget::resize(width, height); -- cgit v1.2.3