From 28e53f97a4a58aafe742686fa0b09b711059a853 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sun, 23 Aug 2026 14:00:59 +0200 Subject: [PATCH] remove MacOSTabFixStyle --- .../interface/widgets/tabs/tab_supervisor.cpp | 18 ------------------ .../interface/widgets/tabs/tab_supervisor.h | 8 -------- 2 files changed, 26 deletions(-) diff --git a/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp b/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp index d8f2e7935..39fd44438 100644 --- a/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp +++ b/cockatrice/src/interface/widgets/tabs/tab_supervisor.cpp @@ -43,18 +43,6 @@ #include #include -QRect MacOSTabFixStyle::subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const -{ - if (element != SE_TabBarTabText) { - return QProxyStyle::subElementRect(element, option, widget); - } - - // Skip over QProxyStyle handling subElementRect, - // This fixes an issue on OSX where the labels for tabs with a button and an icon - // get cut-off too early - return QCommonStyle::subElementRect(element, option, widget); -} - CloseButton::CloseButton(QWidget *parent) : QAbstractButton(parent) { setFocusPolicy(Qt::NoFocus); @@ -118,12 +106,6 @@ TabSupervisor::TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget * setMovable(true); setIconSize(QSize(15, 15)); -#if defined(Q_OS_MAC) - // This is necessary to fix an issue on macOS, - // where tabs with icons and buttons get drawn incorrectly - tabBar()->setStyle(new MacOSTabFixStyle); -#endif - userListManager = new UserListManager(client, this); // connect tab changes diff --git a/cockatrice/src/interface/widgets/tabs/tab_supervisor.h b/cockatrice/src/interface/widgets/tabs/tab_supervisor.h index d3c147138..5d349e18c 100644 --- a/cockatrice/src/interface/widgets/tabs/tab_supervisor.h +++ b/cockatrice/src/interface/widgets/tabs/tab_supervisor.h @@ -21,7 +21,6 @@ #include #include #include -#include #include class TabCardArtRules; @@ -52,13 +51,6 @@ class ServerInfo_User; class GameReplay; class DeckList; -class MacOSTabFixStyle : public QProxyStyle -{ - Q_OBJECT -public: - QRect subElementRect(SubElement, const QStyleOption *, const QWidget *) const override; -}; - class CloseButton : public QAbstractButton { Q_OBJECT