remove MacOSTabFixStyle

This commit is contained in:
tooomm 2026-08-23 14:00:59 +02:00
parent 9c337394a1
commit 28e53f97a4
2 changed files with 0 additions and 26 deletions

View file

@ -43,18 +43,6 @@
#include <libcockatrice/settings/interface_settings.h>
#include <libcockatrice/settings/tabs_settings.h>
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

View file

@ -21,7 +21,6 @@
#include <QAbstractButton>
#include <QLoggingCategory>
#include <QMap>
#include <QProxyStyle>
#include <QTabWidget>
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