(acb8252d0abf5cf0c7166312f180d5d325f6ccd6)
#include <AppKit/AppKit.h>
#include "qmacstyle_mac_p.h"
#include "qmacstyle_mac_p_p.h"
#include <QtCore/qoperatingsystemversion.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtGui/qpainterpath.h>
#include <QtGui/qstylehints.h>
#include <QtGui/private/qcoregraphics_p.h>
#include <QtGui/qpa/qplatformfontdatabase.h>
#include <QtGui/qpa/qplatformtheme.h>
#include <QtWidgets/private/qstyleanimation_p.h>
#include <cmath>
Go to the source code of this file.
|
enum | QAquaMetric {
CheckBoxHeight = 0
, CheckBoxWidth
, EditTextFrameOutset
, FocusRectOutset
,
HSliderHeight
, HSliderTickHeight
, LargeProgressBarThickness
, ListHeaderHeight
,
MenuSeparatorHeight
, MiniCheckBoxHeight
, MiniCheckBoxWidth
, MiniHSliderHeight
,
MiniHSliderTickHeight
, MiniPopupButtonHeight
, MiniPushButtonHeight
, MiniRadioButtonHeight
,
MiniRadioButtonWidth
, MiniVSliderTickWidth
, MiniVSliderWidth
, NormalProgressBarThickness
,
PopupButtonHeight
, ProgressBarShadowOutset
, PushButtonHeight
, RadioButtonHeight
,
RadioButtonWidth
, SeparatorSize
, SmallCheckBoxHeight
, SmallCheckBoxWidth
,
SmallHSliderHeight
, SmallHSliderTickHeight
, SmallPopupButtonHeight
, SmallProgressBarShadowOutset
,
SmallPushButtonHeight
, SmallRadioButtonHeight
, SmallRadioButtonWidth
, SmallVSliderTickWidth
,
SmallVSliderWidth
, VSliderTickWidth
, VSliderWidth
, CheckBoxHeight = 0
,
CheckBoxWidth
, EditTextFrameOutset
, FocusRectOutset
, HSliderHeight
,
HSliderTickHeight
, LargeProgressBarThickness
, ListHeaderHeight
, MenuSeparatorHeight
,
MiniCheckBoxHeight
, MiniCheckBoxWidth
, MiniHSliderHeight
, MiniHSliderTickHeight
,
MiniPopupButtonHeight
, MiniPushButtonHeight
, MiniRadioButtonHeight
, MiniRadioButtonWidth
,
MiniVSliderTickWidth
, MiniVSliderWidth
, NormalProgressBarThickness
, PopupButtonHeight
,
ProgressBarShadowOutset
, PushButtonHeight
, RadioButtonHeight
, RadioButtonWidth
,
SeparatorSize
, SmallCheckBoxHeight
, SmallCheckBoxWidth
, SmallHSliderHeight
,
SmallHSliderTickHeight
, SmallPopupButtonHeight
, SmallProgressBarShadowOutset
, SmallPushButtonHeight
,
SmallRadioButtonHeight
, SmallRadioButtonWidth
, SmallVSliderTickWidth
, SmallVSliderWidth
,
VSliderTickWidth
, VSliderWidth
} |
|
enum | QAquaMetric {
CheckBoxHeight = 0
, CheckBoxWidth
, EditTextFrameOutset
, FocusRectOutset
,
HSliderHeight
, HSliderTickHeight
, LargeProgressBarThickness
, ListHeaderHeight
,
MenuSeparatorHeight
, MiniCheckBoxHeight
, MiniCheckBoxWidth
, MiniHSliderHeight
,
MiniHSliderTickHeight
, MiniPopupButtonHeight
, MiniPushButtonHeight
, MiniRadioButtonHeight
,
MiniRadioButtonWidth
, MiniVSliderTickWidth
, MiniVSliderWidth
, NormalProgressBarThickness
,
PopupButtonHeight
, ProgressBarShadowOutset
, PushButtonHeight
, RadioButtonHeight
,
RadioButtonWidth
, SeparatorSize
, SmallCheckBoxHeight
, SmallCheckBoxWidth
,
SmallHSliderHeight
, SmallHSliderTickHeight
, SmallPopupButtonHeight
, SmallProgressBarShadowOutset
,
SmallPushButtonHeight
, SmallRadioButtonHeight
, SmallRadioButtonWidth
, SmallVSliderTickWidth
,
SmallVSliderWidth
, VSliderTickWidth
, VSliderWidth
, CheckBoxHeight = 0
,
CheckBoxWidth
, EditTextFrameOutset
, FocusRectOutset
, HSliderHeight
,
HSliderTickHeight
, LargeProgressBarThickness
, ListHeaderHeight
, MenuSeparatorHeight
,
MiniCheckBoxHeight
, MiniCheckBoxWidth
, MiniHSliderHeight
, MiniHSliderTickHeight
,
MiniPopupButtonHeight
, MiniPushButtonHeight
, MiniRadioButtonHeight
, MiniRadioButtonWidth
,
MiniVSliderTickWidth
, MiniVSliderWidth
, NormalProgressBarThickness
, PopupButtonHeight
,
ProgressBarShadowOutset
, PushButtonHeight
, RadioButtonHeight
, RadioButtonWidth
,
SeparatorSize
, SmallCheckBoxHeight
, SmallCheckBoxWidth
, SmallHSliderHeight
,
SmallHSliderTickHeight
, SmallPopupButtonHeight
, SmallProgressBarShadowOutset
, SmallPushButtonHeight
,
SmallRadioButtonHeight
, SmallRadioButtonWidth
, SmallVSliderTickWidth
, SmallVSliderWidth
,
VSliderTickWidth
, VSliderWidth
} |
|
|
| QT_NAMESPACE_ALIAS_OBJC_CLASS (QIndeterminateProgressIndicator) |
|
| QT_NAMESPACE_ALIAS_OBJC_CLASS (QVerticalSplitView) |
|
| QT_NAMESPACE_ALIAS_OBJC_CLASS (QDarkNSBox) |
|
static bool | isDarkMode () |
|
static bool | setupScroller (NSScroller *scroller, const QStyleOptionSlider *sb) |
|
static bool | setupSlider (NSSlider *slider, const QStyleOptionSlider *sl) |
|
static bool | isInMacUnifiedToolbarArea (QWindow *window, int windowY) |
|
static QStyleHelper::WidgetSizePolicy | getControlSize (const QStyleOption *option, const QWidget *widget) |
|
static QString | qt_mac_removeMnemonics (const QString &original) |
|
static bool | qt_macWindowMainWindow (const QWidget *window) |
|
static int | qt_mac_aqua_get_metric (QAquaMetric m) |
|
static QSize | qt_aqua_get_known_size (QStyle::ContentsType ct, const QStyleOption *opt, const QWidget *widg, QSize szHint, QStyleHelper::WidgetSizePolicy sz) |
|
static QStyleHelper::WidgetSizePolicy | qt_aqua_guess_size (const QWidget *widg, QSize large, QSize small, QSize mini) |
|
size_t | qHash (const QMacStylePrivate::CocoaControl &cw, size_t seed=0) |
|
QMacStylePrivate::CocoaControlType | cocoaControlType (const QStyleOption *opt, const QWidget *w) |
|
static QPixmap | darkenPixmap (const QPixmap &pixmap) |
|
static void | setLayoutItemMargins (int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir) |
|
|
const int | pushButtonBevelRectOffsets [3] |
|
static const QColor | titlebarSeparatorLineActive (111, 111, 111) |
|
static const QColor | titlebarSeparatorLineInactive (131, 131, 131) |
|
static const QColor | darkModeSeparatorLine (88, 88, 88) |
|
static const QColor | lightMainWindowGradientBegin (240, 240, 240) |
|
static const QColor | lightMainWindowGradientEnd (200, 200, 200) |
|
static const QColor | darkMainWindowGradientBegin (47, 47, 47) |
|
static const QColor | darkMainWindowGradientEnd (47, 47, 47) |
|
static const int | DisclosureOffset = 4 |
|
static const qreal | titleBarIconTitleSpacing = 5 |
|
static const qreal | titleBarTitleRightMargin = 12 |
|
static const qreal | titleBarButtonSpacing = 8 |
|
static const int | headerSectionArrowHeight = 6 |
|
static const int | headerSectionSeparatorInset = 2 |
|
static const QMarginsF | comboBoxFocusRingMargins [3] |
|
static const QMarginsF | pullDownButtonShadowMargins [3] |
|
static const QMarginsF | pushButtonShadowMargins [3] |
|
static const qreal | comboBoxDefaultHeight [3] |
|
static const qreal | pushButtonDefaultHeight [3] |
|
static const qreal | popupButtonDefaultHeight [3] |
|
static const int | toolButtonArrowSize = 7 |
|
static const int | toolButtonArrowMargin = 2 |
|
static const qreal | focusRingWidth = 3.5 |
|
const int | macItemFrame = 2 |
|
const int | macItemHMargin = 3 |
|
const int | macRightBorder = 12 |
|
static const int | qt_mac_aqua_metrics [] |
|
return | ret = msgBox.exec() |
| [0]
|
|
◆ QMAC_QAQUASTYLE_SIZE_CONSTRAIN
#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN |
◆ QAquaMetric [1/2]
Enumerator |
---|
CheckBoxHeight | |
CheckBoxWidth | |
EditTextFrameOutset | |
FocusRectOutset | |
HSliderHeight | |
HSliderTickHeight | |
LargeProgressBarThickness | |
ListHeaderHeight | |
MenuSeparatorHeight | |
MiniCheckBoxHeight | |
MiniCheckBoxWidth | |
MiniHSliderHeight | |
MiniHSliderTickHeight | |
MiniPopupButtonHeight | |
MiniPushButtonHeight | |
MiniRadioButtonHeight | |
MiniRadioButtonWidth | |
MiniVSliderTickWidth | |
MiniVSliderWidth | |
NormalProgressBarThickness | |
PopupButtonHeight | |
ProgressBarShadowOutset | |
PushButtonHeight | |
RadioButtonHeight | |
RadioButtonWidth | |
SeparatorSize | |
SmallCheckBoxHeight | |
SmallCheckBoxWidth | |
SmallHSliderHeight | |
SmallHSliderTickHeight | |
SmallPopupButtonHeight | |
SmallProgressBarShadowOutset | |
SmallPushButtonHeight | |
SmallRadioButtonHeight | |
SmallRadioButtonWidth | |
SmallVSliderTickWidth | |
SmallVSliderWidth | |
VSliderTickWidth | |
VSliderWidth | |
CheckBoxHeight | |
CheckBoxWidth | |
EditTextFrameOutset | |
FocusRectOutset | |
HSliderHeight | |
HSliderTickHeight | |
LargeProgressBarThickness | |
ListHeaderHeight | |
MenuSeparatorHeight | |
MiniCheckBoxHeight | |
MiniCheckBoxWidth | |
MiniHSliderHeight | |
MiniHSliderTickHeight | |
MiniPopupButtonHeight | |
MiniPushButtonHeight | |
MiniRadioButtonHeight | |
MiniRadioButtonWidth | |
MiniVSliderTickWidth | |
MiniVSliderWidth | |
NormalProgressBarThickness | |
PopupButtonHeight | |
ProgressBarShadowOutset | |
PushButtonHeight | |
RadioButtonHeight | |
RadioButtonWidth | |
SeparatorSize | |
SmallCheckBoxHeight | |
SmallCheckBoxWidth | |
SmallHSliderHeight | |
SmallHSliderTickHeight | |
SmallPopupButtonHeight | |
SmallProgressBarShadowOutset | |
SmallPushButtonHeight | |
SmallRadioButtonHeight | |
SmallRadioButtonWidth | |
SmallVSliderTickWidth | |
SmallVSliderWidth | |
VSliderTickWidth | |
VSliderWidth | |
Definition at line 666 of file qmacstyle_mac.mm.
◆ QAquaMetric [2/2]
Enumerator |
---|
CheckBoxHeight | |
CheckBoxWidth | |
EditTextFrameOutset | |
FocusRectOutset | |
HSliderHeight | |
HSliderTickHeight | |
LargeProgressBarThickness | |
ListHeaderHeight | |
MenuSeparatorHeight | |
MiniCheckBoxHeight | |
MiniCheckBoxWidth | |
MiniHSliderHeight | |
MiniHSliderTickHeight | |
MiniPopupButtonHeight | |
MiniPushButtonHeight | |
MiniRadioButtonHeight | |
MiniRadioButtonWidth | |
MiniVSliderTickWidth | |
MiniVSliderWidth | |
NormalProgressBarThickness | |
PopupButtonHeight | |
ProgressBarShadowOutset | |
PushButtonHeight | |
RadioButtonHeight | |
RadioButtonWidth | |
SeparatorSize | |
SmallCheckBoxHeight | |
SmallCheckBoxWidth | |
SmallHSliderHeight | |
SmallHSliderTickHeight | |
SmallPopupButtonHeight | |
SmallProgressBarShadowOutset | |
SmallPushButtonHeight | |
SmallRadioButtonHeight | |
SmallRadioButtonWidth | |
SmallVSliderTickWidth | |
SmallVSliderWidth | |
VSliderTickWidth | |
VSliderWidth | |
CheckBoxHeight | |
CheckBoxWidth | |
EditTextFrameOutset | |
FocusRectOutset | |
HSliderHeight | |
HSliderTickHeight | |
LargeProgressBarThickness | |
ListHeaderHeight | |
MenuSeparatorHeight | |
MiniCheckBoxHeight | |
MiniCheckBoxWidth | |
MiniHSliderHeight | |
MiniHSliderTickHeight | |
MiniPopupButtonHeight | |
MiniPushButtonHeight | |
MiniRadioButtonHeight | |
MiniRadioButtonWidth | |
MiniVSliderTickWidth | |
MiniVSliderWidth | |
NormalProgressBarThickness | |
PopupButtonHeight | |
ProgressBarShadowOutset | |
PushButtonHeight | |
RadioButtonHeight | |
RadioButtonWidth | |
SeparatorSize | |
SmallCheckBoxHeight | |
SmallCheckBoxWidth | |
SmallHSliderHeight | |
SmallHSliderTickHeight | |
SmallPopupButtonHeight | |
SmallProgressBarShadowOutset | |
SmallPushButtonHeight | |
SmallRadioButtonHeight | |
SmallRadioButtonWidth | |
SmallVSliderTickWidth | |
SmallVSliderWidth | |
VSliderTickWidth | |
VSliderWidth | |
Definition at line 666 of file qmacstyle_mac.mm.
◆ cocoaControlType()
◆ darkenPixmap()
◆ getControlSize()
◆ isDarkMode()
static bool isDarkMode |
( |
| ) |
|
|
inlinestatic |
◆ isInMacUnifiedToolbarArea()
static bool isInMacUnifiedToolbarArea |
( |
QWindow * | window, |
|
|
int | windowY ) |
|
static |
◆ qHash()
◆ qt_aqua_get_known_size()
Definition at line 758 of file qmacstyle_mac.mm.
References HSliderHeight, HSliderTickHeight, MiniHSliderHeight, MiniHSliderTickHeight, MiniPopupButtonHeight, MiniVSliderTickWidth, MiniVSliderWidth, PopupButtonHeight, qt_mac_aqua_get_metric(), SmallHSliderHeight, SmallHSliderTickHeight, SmallPopupButtonHeight, SmallVSliderTickWidth, SmallVSliderWidth, VSliderTickWidth, and VSliderWidth.
◆ qt_aqua_guess_size()
◆ qt_mac_aqua_get_metric()
◆ qt_mac_removeMnemonics()
◆ qt_macWindowMainWindow()
static bool qt_macWindowMainWindow |
( |
const QWidget * | window | ) |
|
|
static |
◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [1/3]
◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [2/3]
◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [3/3]
◆ setLayoutItemMargins()
◆ setupScroller()
static bool setupScroller |
( |
NSScroller * | scroller, |
|
|
const QStyleOptionSlider * | sb ) |
|
static |
◆ setupSlider()
static bool setupSlider |
( |
NSSlider * | slider, |
|
|
const QStyleOptionSlider * | sl ) |
|
static |
◆ comboBoxDefaultHeight
static const qreal comboBoxDefaultHeight |
|
static |
◆ comboBoxFocusRingMargins
static const QMarginsF comboBoxFocusRingMargins |
|
static |
Initial value:= {
{ 0.5, 2, 3.5, 4 },
{ 0.5, 1, 2.5, 4 },
{ 0.5, 1.5, 2.5, 3.5 }
}
Definition at line 303 of file qmacstyle_mac.mm.
◆ darkMainWindowGradientBegin
static const QColor darkMainWindowGradientBegin |
( |
47 | , |
|
|
47 | , |
|
|
47 | ) |
|
static |
◆ darkMainWindowGradientEnd
static const QColor darkMainWindowGradientEnd |
( |
47 | , |
|
|
47 | , |
|
|
47 | ) |
|
static |
◆ darkModeSeparatorLine
static const QColor darkModeSeparatorLine |
( |
88 | , |
|
|
88 | , |
|
|
88 | ) |
|
static |
◆ DisclosureOffset
static const int DisclosureOffset = 4 |
|
static |
◆ focusRingWidth
static const qreal focusRingWidth = 3.5 |
|
static |
◆ headerSectionArrowHeight
static const int headerSectionArrowHeight = 6 |
|
static |
◆ headerSectionSeparatorInset
static const int headerSectionSeparatorInset = 2 |
|
static |
◆ lightMainWindowGradientBegin
static const QColor lightMainWindowGradientBegin |
( |
240 | , |
|
|
240 | , |
|
|
240 | ) |
|
static |
◆ lightMainWindowGradientEnd
static const QColor lightMainWindowGradientEnd |
( |
200 | , |
|
|
200 | , |
|
|
200 | ) |
|
static |
◆ macItemFrame
const int macItemFrame = 2 |
◆ macItemHMargin
const int macItemHMargin = 3 |
◆ macRightBorder
const int macRightBorder = 12 |
◆ popupButtonDefaultHeight
static const qreal popupButtonDefaultHeight |
|
static |
◆ pullDownButtonShadowMargins
static const QMarginsF pullDownButtonShadowMargins |
|
static |
Initial value:= {
{ 0.5, -1, 0.5, 2 },
{ 0.5, -1.5, 0.5, 2.5 },
{ 0.5, 0, 0.5, 1 }
}
Definition at line 309 of file qmacstyle_mac.mm.
◆ pushButtonBevelRectOffsets
const int pushButtonBevelRectOffsets |
Initial value:= {
}
static const int PushButtonLeftOffset
Definition at line 158 of file qmacstyle_mac.mm.
◆ pushButtonDefaultHeight
static const qreal pushButtonDefaultHeight |
|
static |
◆ pushButtonShadowMargins
static const QMarginsF pushButtonShadowMargins |
|
static |
Initial value:= {
{ 1.5, -1.5, 1.5, 4.5 },
{ 1.5, -1, 1.5, 4 },
{ 1.5, 0.5, 1.5, 2.5 }
}
Definition at line 315 of file qmacstyle_mac.mm.
◆ qt_mac_aqua_metrics
static const int qt_mac_aqua_metrics |
|
static |
◆ ret
◆ titleBarButtonSpacing
static const qreal titleBarButtonSpacing = 8 |
|
static |
◆ titleBarIconTitleSpacing
static const qreal titleBarIconTitleSpacing = 5 |
|
static |
◆ titlebarSeparatorLineActive
static const QColor titlebarSeparatorLineActive |
( |
111 | , |
|
|
111 | , |
|
|
111 | ) |
|
static |
◆ titlebarSeparatorLineInactive
static const QColor titlebarSeparatorLineInactive |
( |
131 | , |
|
|
131 | , |
|
|
131 | ) |
|
static |
◆ titleBarTitleRightMargin
static const qreal titleBarTitleRightMargin = 12 |
|
static |
◆ toolButtonArrowMargin
static const int toolButtonArrowMargin = 2 |
|
static |
◆ toolButtonArrowSize
static const int toolButtonArrowSize = 7 |
|
static |