diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/basiccontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/tabbedarea.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/widget.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/widget.h | 13 |
4 files changed, 9 insertions, 12 deletions
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp index 26434d7e9..8a4d3162a 100644 --- a/src/gui/widgets/basiccontainer.cpp +++ b/src/gui/widgets/basiccontainer.cpp @@ -305,7 +305,7 @@ void BasicContainer::drawChildren(Graphics *const restrict graphics) restrict2 FOR_EACH (WidgetListConstIterator, iter, mWidgets) { Widget *restrict const widget = *iter; - if (widget->isVisibleLocal()) + if (widget->mVisible == Visible_true) { // If the widget has a frame, // draw it before drawing the widget @@ -346,7 +346,7 @@ void BasicContainer::safeDrawChildren(Graphics *const restrict graphics) FOR_EACH (WidgetListConstIterator, iter, mWidgets) { Widget *restrict const widget = *iter; - if (widget->isVisibleLocal()) + if (widget->mVisible == Visible_true) { // If the widget has a frame, // draw it before drawing the widget diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 2d1acc5fc..2a1f59bbf 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -580,7 +580,7 @@ void TabbedArea::adjustTabPositions() maxTabHeight = tab->getHeight(); } - int x = (mEnableScrollButtons && mArrowButton[0]->isVisibleLocal()) + int x = (mEnableScrollButtons && mArrowButton[0]->mVisible == Visible_true) ? mArrowButton[0]->getWidth() : 0; for (size_t i = mTabScrollIndex; i < sz; ++i) { diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp index 1ddd2c120..f2f112c61 100644 --- a/src/gui/widgets/widget.cpp +++ b/src/gui/widgets/widget.cpp @@ -81,6 +81,7 @@ std::set<Widget*> Widget::mWidgetsSet; Widget::Widget(const Widget2 *const widget) : Widget2(widget), + mVisible(Visible_true), mMouseListeners(), mKeyListeners(), mActionListeners(), @@ -99,7 +100,6 @@ Widget::Widget(const Widget2 *const widget) : mCurrentFont(nullptr), mFrameSize(0), mFocusable(false), - mVisible(Visible_true), mTabIn(true), mTabOut(true), mEnabled(true), diff --git a/src/gui/widgets/widget.h b/src/gui/widgets/widget.h index b94f81251..ed11955e5 100644 --- a/src/gui/widgets/widget.h +++ b/src/gui/widgets/widget.h @@ -401,9 +401,6 @@ class Widget notfinal : public Widget2 { return mVisible == Visible_true && (!mParent || mParent->isVisible()); } - bool isVisibleLocal() const noexcept A_WARN_UNUSED - { return mVisible == Visible_true; } - /** * Sets the base color of the widget. * @@ -1032,6 +1029,11 @@ class Widget notfinal : public Widget2 virtual void postInit() { } + /** + * True if the widget visible, false otherwise. + */ + Visible mVisible; + protected: /** * Distributes an action event to all action listeners @@ -1221,11 +1223,6 @@ class Widget notfinal : public Widget2 bool mFocusable; /** - * True if the widget visible, false otherwise. - */ - Visible mVisible; - - /** * True if the widget has tab in enabled, false otherwise. */ bool mTabIn; |