From c436f29a1efc1dd2ec04239618252180d1c1b9dd Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Sun, 9 Aug 2020 20:07:31 +0300 Subject: [PATCH] Make Advanced tab of the launcher look okay for everyone again --- apps/launcher/advancedpage.cpp | 32 -------------------------------- files/ui/advancedpage.ui | 11 ++++------- 2 files changed, 4 insertions(+), 39 deletions(-) diff --git a/apps/launcher/advancedpage.cpp b/apps/launcher/advancedpage.cpp index e82afc303d..1cc77ec6dc 100644 --- a/apps/launcher/advancedpage.cpp +++ b/apps/launcher/advancedpage.cpp @@ -10,37 +10,6 @@ #include - -class HorizontalTextWestTabStyle : public QProxyStyle -{ -public: - QSize sizeFromContents(ContentsType type, const QStyleOption* option, const QSize& size, const QWidget* widget) const - { - QSize s = QProxyStyle::sizeFromContents(type, option, size, widget); - if (type == QStyle::CT_TabBarTab) - { - s.transpose(); - s.setHeight(s.height() + 20); - } - return s; - } - - void drawControl(ControlElement element, const QStyleOption* option, QPainter* painter, const QWidget* widget) const - { - if (element == CE_TabBarTabLabel) - { - if (const QStyleOptionTab* tab = qstyleoption_cast(option)) - { - QStyleOptionTab opt(*tab); - opt.shape = QTabBar::RoundedNorth; - QProxyStyle::drawControl(element, &opt, painter, widget); - return; - } - } - QProxyStyle::drawControl(element, option, painter, widget); - } -}; - Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg, Config::GameSettings &gameSettings, Settings::Manager &engineSettings, QWidget *parent) @@ -53,7 +22,6 @@ Launcher::AdvancedPage::AdvancedPage(Files::ConfigurationManager &cfg, setupUi(this); loadSettings(); - AdvancedTabWidget->tabBar()->setStyle(new HorizontalTextWestTabStyle); mCellNameCompleter.setModel(&mCellNameCompleterModel); startDefaultCharacterAtField->setCompleter(&mCellNameCompleter); } diff --git a/files/ui/advancedpage.ui b/files/ui/advancedpage.ui index ca57e5dc81..4f1a30d4c9 100644 --- a/files/ui/advancedpage.ui +++ b/files/ui/advancedpage.ui @@ -5,15 +5,12 @@ - - QTabWidget::West - 0 - Game mechanics + Game Mechanics @@ -509,9 +506,9 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C - + - Interface changes + Interface @@ -618,7 +615,7 @@ True: In non-combat mode camera is positioned behind the character's shoulder. C - Bug fixes + Bug Fixes