From 64a79fd1ab4270ed50ef62cf0a795c842eb4d72a Mon Sep 17 00:00:00 2001 From: Alexander Tkachev Date: Tue, 12 Jul 2016 22:37:57 +0600 Subject: GUI: Fix TabWidget height issues Changes theme stx files to specify TabWidget's type. That fixes wrong TabWidget height. Changes TabWidget's getHeight() to return not only "children" height, but also tabs height. That fixes wrong clipping area. Changes Widget's findWidget to use getHeight(). That fixes bug when widgets in the bottom of TabWidget were not reacting to the mouse events. --- gui/widget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gui/widget.cpp') diff --git a/gui/widget.cpp b/gui/widget.cpp index 32ca0223c5..f2a29c3100 100644 --- a/gui/widget.cpp +++ b/gui/widget.cpp @@ -156,7 +156,7 @@ void Widget::draw() { Widget *Widget::findWidgetInChain(Widget *w, int x, int y) { while (w) { // Stop as soon as we find a widget that contains the point (x,y) - if (x >= w->_x && x < w->_x + w->_w && y >= w->_y && y < w->_y + w->_h) + if (x >= w->_x && x < w->_x + w->_w && y >= w->_y && y < w->_y + w->getHeight()) break; w = w->_next; } -- cgit v1.2.3