#include "widgets/splits/SplitHeader.hpp" #include "Application.hpp" #include "providers/twitch/TwitchChannel.hpp" #include "providers/twitch/TwitchServer.hpp" #include "singletons/ResourceManager.hpp" #include "singletons/ThemeManager.hpp" #include "util/LayoutCreator.hpp" #include "common/UrlFetch.hpp" #include "widgets/Label.hpp" #include "widgets/splits/Split.hpp" #include "widgets/splits/SplitContainer.hpp" #include "widgets/TooltipWidget.hpp" #include #include #include #include #include #ifdef USEWEBENGINE #include "widgets/StreamView.hpp" #endif namespace chatterino { SplitHeader::SplitHeader(Split *_split) : BaseWidget(_split) , split(_split) { this->split->focused.connect([this]() { this->themeRefreshEvent(); }); this->split->focusLost.connect([this]() { this->themeRefreshEvent(); }); auto app = getApp(); util::LayoutCreator layoutCreator(this); auto layout = layoutCreator.emplace().withoutMargin(); { // dropdown label auto dropdown = layout.emplace(this).assign(&this->dropdownButton); dropdown->setMouseTracking(true); dropdown->setPixmap(*app->resources->splitHeaderContext->getPixmap()); this->addDropdownItems(dropdown.getElement()); QObject::connect(dropdown.getElement(), &RippleEffectButton::clicked, this, [this] { QTimer::singleShot(80, [&, this] { this->dropdownMenu.move( this->dropdownButton->mapToGlobal(QPoint(0, this->dropdownButton->height()))); this->dropdownMenu.show(); }); }); // channel name label auto title = layout.emplace