mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-25 02:43:02 -07:00
remove MacOSTabFixStyle
This commit is contained in:
parent
9c337394a1
commit
28e53f97a4
2 changed files with 0 additions and 26 deletions
|
|
@ -43,18 +43,6 @@
|
||||||
#include <libcockatrice/settings/interface_settings.h>
|
#include <libcockatrice/settings/interface_settings.h>
|
||||||
#include <libcockatrice/settings/tabs_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)
|
CloseButton::CloseButton(QWidget *parent) : QAbstractButton(parent)
|
||||||
{
|
{
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
|
@ -118,12 +106,6 @@ TabSupervisor::TabSupervisor(AbstractClient *_client, QMenu *tabsMenu, QWidget *
|
||||||
setMovable(true);
|
setMovable(true);
|
||||||
setIconSize(QSize(15, 15));
|
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);
|
userListManager = new UserListManager(client, this);
|
||||||
|
|
||||||
// connect tab changes
|
// connect tab changes
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QProxyStyle>
|
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
|
|
||||||
class TabCardArtRules;
|
class TabCardArtRules;
|
||||||
|
|
@ -52,13 +51,6 @@ class ServerInfo_User;
|
||||||
class GameReplay;
|
class GameReplay;
|
||||||
class DeckList;
|
class DeckList;
|
||||||
|
|
||||||
class MacOSTabFixStyle : public QProxyStyle
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
QRect subElementRect(SubElement, const QStyleOption *, const QWidget *) const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
class CloseButton : public QAbstractButton
|
class CloseButton : public QAbstractButton
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue