summaryrefslogtreecommitdiff
path: root/src/gui/widgets/widget.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
committerAndrei Karas <akaras@inbox.ru>2014-04-13 22:54:28 +0300
commitbcdf34645ff3067d3b4110120b6191af2b0b2e99 (patch)
tree428493a138f0fdaebd4c915153f0dcdcbaedf76d /src/gui/widgets/widget.cpp
parenta93d1e06f928f6e4e1c7f3c58ddb7ae3676c1c63 (diff)
parentb64a1f46b930516927b1290c1d6771b491b84958 (diff)
downloadplus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.gz
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.bz2
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.tar.xz
plus-bcdf34645ff3067d3b4110120b6191af2b0b2e99.zip
Merge branch 'master' into stable
Diffstat (limited to 'src/gui/widgets/widget.cpp')
-rw-r--r--src/gui/widgets/widget.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index aa3e6254b..43c8df92f 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -107,7 +107,9 @@ Widget::Widget(const Widget2 *const widget) :
mTabIn(true),
mTabOut(true),
mEnabled(true),
- mAllowLogic(true)
+ mAllowLogic(true),
+ mMouseConsume(true),
+ mRedraw(true)
{
mWidgets.push_back(this);
mWidgetsSet.insert(this);
@@ -349,6 +351,12 @@ void Widget::setFont(Font *const font)
fontChanged();
}
+void Widget::distributeWindowResizeEvent()
+{
+ FOR_EACH (std::list<Widget*>::const_iterator, iter, mWidgets)
+ (*iter)->windowResized();
+}
+
bool Widget::widgetExists(const Widget* widget)
{
return mWidgetsSet.find(const_cast<Widget*>(widget))
@@ -504,3 +512,8 @@ void Widget::showPart(const Rect &rectangle)
if (mParent)
mParent->showWidgetPart(this, rectangle);
}
+
+void Widget::windowResized()
+{
+ mRedraw = true;
+}