From e875242f380662573880e7400fe3e736a2d3375a Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Tue, 9 Apr 2024 17:36:33 +0200 Subject: General code cleanups --- src/gui/widgets/chattab.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/widgets/chattab.cpp') diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 663464a8..9bdb20ef 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -66,7 +66,7 @@ ChatTab::ChatTab(const std::string &name) listen(Event::ConfigChannel); // Initiate the text format - updateTextFormat(((Window*)getParent())->getGuiAlpha()); + updateTextFormat(Window::getGuiAlpha()); } ChatTab::~ChatTab() @@ -104,8 +104,7 @@ void ChatTab::event(Event::Channel channel, const Event &event) event.getType() == Event::ConfigOptionChanged && event.getString("option") == "guialpha") { - int alpha = ((Window*)getParent())->getGuiAlpha(); - updateTextFormat(alpha); + updateTextFormat(Window::getGuiAlpha()); } } -- cgit v1.2.3-70-g09d2