summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/setup_colors.cpp2
-rw-r--r--src/gui/widgets/textpreview.cpp5
-rw-r--r--src/gui/widgets/textpreview.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index 2cc3bac1d..34a46eb16 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -54,7 +54,7 @@ Setup_Colors::Setup_Colors(const Widget2 *const widget) :
mColorBox(new ListBox(this, userPalette)),
mScroll(new ScrollArea(mColorBox, true, "setup_colors_background.xml")),
mPreview(new BrowserBox(this, BrowserBox::AUTO_WRAP)),
- mTextPreview(new TextPreview(rawmsg)),
+ mTextPreview(new TextPreview(this, rawmsg)),
mPreviewBox(new ScrollArea(mPreview, true,
"setup_colors_preview_background.xml")),
mSelected(-1),
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index 92ab9e4b9..47cd71dfa 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -33,9 +33,10 @@
float TextPreview::mAlpha = 1.0;
-TextPreview::TextPreview(const std::string &text) :
+TextPreview::TextPreview(const Widget2 *const widget,
+ const std::string &text) :
gcn::Widget(),
- Widget2(),
+ Widget2(widget),
mFont(gui->getFont()),
mText(text),
mTextColor(&getThemeColor(Theme::TEXT)),
diff --git a/src/gui/widgets/textpreview.h b/src/gui/widgets/textpreview.h
index c2a46930e..5e84900ff 100644
--- a/src/gui/widgets/textpreview.h
+++ b/src/gui/widgets/textpreview.h
@@ -38,7 +38,7 @@ class TextPreview final : public gcn::Widget,
public Widget2
{
public:
- TextPreview(const std::string &text);
+ TextPreview(const Widget2 *const widget, const std::string &text);
A_DELETE_COPY(TextPreview)