From 70a9ee7cc6a2402c33c3cdd33bc86f02fcb59ade Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 Aug 2016 16:51:19 +0300 Subject: Draw each window in unit tests. --- src/gui/widgets/label.cpp | 5 +++++ src/gui/widgets/label.h | 1 + src/gui/widgets/tabs/tab.cpp | 8 ++++++++ src/gui/widgets/tabs/tab.h | 2 ++ 4 files changed, 16 insertions(+) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/label.cpp b/src/gui/widgets/label.cpp index 249534945..c32b72b99 100644 --- a/src/gui/widgets/label.cpp +++ b/src/gui/widgets/label.cpp @@ -284,3 +284,8 @@ void Label::widgetHidden(const Event &event A_UNUSED) mTextChanged = true; mTextChunk.deleteImage(); } + +void Label::final() +{ + mSkin = nullptr; +} diff --git a/src/gui/widgets/label.h b/src/gui/widgets/label.h index 9d6777b3b..028d1e8d5 100644 --- a/src/gui/widgets/label.h +++ b/src/gui/widgets/label.h @@ -172,6 +172,7 @@ class Label final : public Widget, static int mInstances; + static void final(); private: /** * Holds the caption of the label. diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp index 2555ca52b..39e966886 100644 --- a/src/gui/widgets/tabs/tab.cpp +++ b/src/gui/widgets/tabs/tab.cpp @@ -478,3 +478,11 @@ void Tab::mouseExited(MouseEvent& event A_UNUSED) { mHasMouse = false; } + +void Tab::final() +{ + for (int f = 0; f < TAB_COUNT; f ++) + { + tabImg[f] = nullptr; + } +} diff --git a/src/gui/widgets/tabs/tab.h b/src/gui/widgets/tabs/tab.h index d32cc176c..74b9f46be 100644 --- a/src/gui/widgets/tabs/tab.h +++ b/src/gui/widgets/tabs/tab.h @@ -202,6 +202,8 @@ class Tab notfinal : public BasicContainer, void setImage(Image *const image); + static void final(); + protected: friend class TabbedArea; -- cgit v1.2.3-60-g2f50