Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickmacstyle_mac.mm File Reference

(01f096cea97f1793e005311233b9555b24a8aba0)

#include <AppKit/AppKit.h>
#include "qquickmacstyle_mac_p.h"
#include "qquickmacstyle_mac_p_p.h"
#include "qquickstylehelper_p.h"
#include <QtQuickTemplates2/private/qquickcontrol_p.h>
#include <QtCore/qoperatingsystemversion.h>
#include <QtCore/qvariant.h>
#include <QtCore/qvarlengtharray.h>
#include <QtGui/qpainterpath.h>
#include <QtGui/qstylehints.h>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QtGui/qpa/qplatformfontdatabase.h>
#include <QtGui/qpa/qplatformtheme.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtGui/private/qcoregraphics_p.h>
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/private/qmacstyle_p.h>
#include <cmath>
Include dependency graph for qquickmacstyle_mac.mm:

Go to the source code of this file.

Classes

category  QT_MANGLE_NAMESPACE(QIndeterminateProgressIndicator)
category  QT_MANGLE_NAMESPACE(QVerticalSplitView)
category  QT_MANGLE_NAMESPACE(QDarkNSBox)

Namespaces

namespace  QQC2_NAMESPACE

Macros

#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN
#define QQC2_MANGLE1(a, b)
#define QQC2_MANGLE2(a, b)
#define QT_MANGLE_NAMESPACE(name)
#define QT_NAMESPACE_ALIAS_OBJC_CLASS(name)
#define LargeSmallMini(option, large, small, mini)

Enumerations

enum  QQC2_NAMESPACE::QAquaMetric {
  QQC2_NAMESPACE::CheckBoxHeight = 0 , QQC2_NAMESPACE::CheckBoxWidth , QQC2_NAMESPACE::EditTextFrameOutset , QQC2_NAMESPACE::FocusRectOutset ,
  QQC2_NAMESPACE::HSliderHeight , QQC2_NAMESPACE::HSliderTickHeight , QQC2_NAMESPACE::LargeProgressBarThickness , QQC2_NAMESPACE::ListHeaderHeight ,
  QQC2_NAMESPACE::MenuSeparatorHeight , QQC2_NAMESPACE::MiniCheckBoxHeight , QQC2_NAMESPACE::MiniCheckBoxWidth , QQC2_NAMESPACE::MiniHSliderHeight ,
  QQC2_NAMESPACE::MiniHSliderTickHeight , QQC2_NAMESPACE::MiniPopupButtonHeight , QQC2_NAMESPACE::MiniPushButtonHeight , QQC2_NAMESPACE::MiniRadioButtonHeight ,
  QQC2_NAMESPACE::MiniRadioButtonWidth , QQC2_NAMESPACE::MiniVSliderTickWidth , QQC2_NAMESPACE::MiniVSliderWidth , QQC2_NAMESPACE::NormalProgressBarThickness ,
  QQC2_NAMESPACE::PopupButtonHeight , QQC2_NAMESPACE::ProgressBarShadowOutset , QQC2_NAMESPACE::PushButtonHeight , QQC2_NAMESPACE::RadioButtonHeight ,
  QQC2_NAMESPACE::RadioButtonWidth , QQC2_NAMESPACE::SeparatorSize , QQC2_NAMESPACE::SmallCheckBoxHeight , QQC2_NAMESPACE::SmallCheckBoxWidth ,
  QQC2_NAMESPACE::SmallHSliderHeight , QQC2_NAMESPACE::SmallHSliderTickHeight , QQC2_NAMESPACE::SmallPopupButtonHeight , QQC2_NAMESPACE::SmallProgressBarShadowOutset ,
  QQC2_NAMESPACE::SmallPushButtonHeight , QQC2_NAMESPACE::SmallRadioButtonHeight , QQC2_NAMESPACE::SmallRadioButtonWidth , QQC2_NAMESPACE::SmallVSliderTickWidth ,
  QQC2_NAMESPACE::SmallVSliderWidth , QQC2_NAMESPACE::VSliderTickWidth , QQC2_NAMESPACE::VSliderWidth , QQC2_NAMESPACE::CheckBoxHeight = 0 ,
  QQC2_NAMESPACE::CheckBoxWidth , QQC2_NAMESPACE::EditTextFrameOutset , QQC2_NAMESPACE::FocusRectOutset , QQC2_NAMESPACE::HSliderHeight ,
  QQC2_NAMESPACE::HSliderTickHeight , QQC2_NAMESPACE::LargeProgressBarThickness , QQC2_NAMESPACE::ListHeaderHeight , QQC2_NAMESPACE::MenuSeparatorHeight ,
  QQC2_NAMESPACE::MiniCheckBoxHeight , QQC2_NAMESPACE::MiniCheckBoxWidth , QQC2_NAMESPACE::MiniHSliderHeight , QQC2_NAMESPACE::MiniHSliderTickHeight ,
  QQC2_NAMESPACE::MiniPopupButtonHeight , QQC2_NAMESPACE::MiniPushButtonHeight , QQC2_NAMESPACE::MiniRadioButtonHeight , QQC2_NAMESPACE::MiniRadioButtonWidth ,
  QQC2_NAMESPACE::MiniVSliderTickWidth , QQC2_NAMESPACE::MiniVSliderWidth , QQC2_NAMESPACE::NormalProgressBarThickness , QQC2_NAMESPACE::PopupButtonHeight ,
  QQC2_NAMESPACE::ProgressBarShadowOutset , QQC2_NAMESPACE::PushButtonHeight , QQC2_NAMESPACE::RadioButtonHeight , QQC2_NAMESPACE::RadioButtonWidth ,
  QQC2_NAMESPACE::SeparatorSize , QQC2_NAMESPACE::SmallCheckBoxHeight , QQC2_NAMESPACE::SmallCheckBoxWidth , QQC2_NAMESPACE::SmallHSliderHeight ,
  QQC2_NAMESPACE::SmallHSliderTickHeight , QQC2_NAMESPACE::SmallPopupButtonHeight , QQC2_NAMESPACE::SmallProgressBarShadowOutset , QQC2_NAMESPACE::SmallPushButtonHeight ,
  QQC2_NAMESPACE::SmallRadioButtonHeight , QQC2_NAMESPACE::SmallRadioButtonWidth , QQC2_NAMESPACE::SmallVSliderTickWidth , QQC2_NAMESPACE::SmallVSliderWidth ,
  QQC2_NAMESPACE::VSliderTickWidth , QQC2_NAMESPACE::VSliderWidth
}
enum  QQC2_NAMESPACE::QAquaMetric {
  QQC2_NAMESPACE::CheckBoxHeight = 0 , QQC2_NAMESPACE::CheckBoxWidth , QQC2_NAMESPACE::EditTextFrameOutset , QQC2_NAMESPACE::FocusRectOutset ,
  QQC2_NAMESPACE::HSliderHeight , QQC2_NAMESPACE::HSliderTickHeight , QQC2_NAMESPACE::LargeProgressBarThickness , QQC2_NAMESPACE::ListHeaderHeight ,
  QQC2_NAMESPACE::MenuSeparatorHeight , QQC2_NAMESPACE::MiniCheckBoxHeight , QQC2_NAMESPACE::MiniCheckBoxWidth , QQC2_NAMESPACE::MiniHSliderHeight ,
  QQC2_NAMESPACE::MiniHSliderTickHeight , QQC2_NAMESPACE::MiniPopupButtonHeight , QQC2_NAMESPACE::MiniPushButtonHeight , QQC2_NAMESPACE::MiniRadioButtonHeight ,
  QQC2_NAMESPACE::MiniRadioButtonWidth , QQC2_NAMESPACE::MiniVSliderTickWidth , QQC2_NAMESPACE::MiniVSliderWidth , QQC2_NAMESPACE::NormalProgressBarThickness ,
  QQC2_NAMESPACE::PopupButtonHeight , QQC2_NAMESPACE::ProgressBarShadowOutset , QQC2_NAMESPACE::PushButtonHeight , QQC2_NAMESPACE::RadioButtonHeight ,
  QQC2_NAMESPACE::RadioButtonWidth , QQC2_NAMESPACE::SeparatorSize , QQC2_NAMESPACE::SmallCheckBoxHeight , QQC2_NAMESPACE::SmallCheckBoxWidth ,
  QQC2_NAMESPACE::SmallHSliderHeight , QQC2_NAMESPACE::SmallHSliderTickHeight , QQC2_NAMESPACE::SmallPopupButtonHeight , QQC2_NAMESPACE::SmallProgressBarShadowOutset ,
  QQC2_NAMESPACE::SmallPushButtonHeight , QQC2_NAMESPACE::SmallRadioButtonHeight , QQC2_NAMESPACE::SmallRadioButtonWidth , QQC2_NAMESPACE::SmallVSliderTickWidth ,
  QQC2_NAMESPACE::SmallVSliderWidth , QQC2_NAMESPACE::VSliderTickWidth , QQC2_NAMESPACE::VSliderWidth , QQC2_NAMESPACE::CheckBoxHeight = 0 ,
  QQC2_NAMESPACE::CheckBoxWidth , QQC2_NAMESPACE::EditTextFrameOutset , QQC2_NAMESPACE::FocusRectOutset , QQC2_NAMESPACE::HSliderHeight ,
  QQC2_NAMESPACE::HSliderTickHeight , QQC2_NAMESPACE::LargeProgressBarThickness , QQC2_NAMESPACE::ListHeaderHeight , QQC2_NAMESPACE::MenuSeparatorHeight ,
  QQC2_NAMESPACE::MiniCheckBoxHeight , QQC2_NAMESPACE::MiniCheckBoxWidth , QQC2_NAMESPACE::MiniHSliderHeight , QQC2_NAMESPACE::MiniHSliderTickHeight ,
  QQC2_NAMESPACE::MiniPopupButtonHeight , QQC2_NAMESPACE::MiniPushButtonHeight , QQC2_NAMESPACE::MiniRadioButtonHeight , QQC2_NAMESPACE::MiniRadioButtonWidth ,
  QQC2_NAMESPACE::MiniVSliderTickWidth , QQC2_NAMESPACE::MiniVSliderWidth , QQC2_NAMESPACE::NormalProgressBarThickness , QQC2_NAMESPACE::PopupButtonHeight ,
  QQC2_NAMESPACE::ProgressBarShadowOutset , QQC2_NAMESPACE::PushButtonHeight , QQC2_NAMESPACE::RadioButtonHeight , QQC2_NAMESPACE::RadioButtonWidth ,
  QQC2_NAMESPACE::SeparatorSize , QQC2_NAMESPACE::SmallCheckBoxHeight , QQC2_NAMESPACE::SmallCheckBoxWidth , QQC2_NAMESPACE::SmallHSliderHeight ,
  QQC2_NAMESPACE::SmallHSliderTickHeight , QQC2_NAMESPACE::SmallPopupButtonHeight , QQC2_NAMESPACE::SmallProgressBarShadowOutset , QQC2_NAMESPACE::SmallPushButtonHeight ,
  QQC2_NAMESPACE::SmallRadioButtonHeight , QQC2_NAMESPACE::SmallRadioButtonWidth , QQC2_NAMESPACE::SmallVSliderTickWidth , QQC2_NAMESPACE::SmallVSliderWidth ,
  QQC2_NAMESPACE::VSliderTickWidth , QQC2_NAMESPACE::VSliderWidth
}

Functions

 QT_NAMESPACE_ALIAS_OBJC_CLASS (QIndeterminateProgressIndicator)
 QT_NAMESPACE_ALIAS_OBJC_CLASS (QVerticalSplitView)
 QT_NAMESPACE_ALIAS_OBJC_CLASS (QDarkNSBox)
static bool QQC2_NAMESPACE::isDarkMode ()
static const QColor QQC2_NAMESPACE::tabBarTabBackgroundActive ()
static const QColor QQC2_NAMESPACE::tabBarTabBackgroundActiveHovered ()
static const QColor QQC2_NAMESPACE::tabBarTabBackgroundActiveSelected ()
static const QColor QQC2_NAMESPACE::tabBarTabBackground ()
static const QColor QQC2_NAMESPACE::tabBarTabBackgroundSelected ()
static const QColor QQC2_NAMESPACE::tabBarTabLineActive ()
static const QColor QQC2_NAMESPACE::tabBarTabLineActiveHovered ()
static const QColor QQC2_NAMESPACE::tabBarTabLine ()
static const QColor QQC2_NAMESPACE::tabBarTabLineSelected ()
QBrush QQC2_NAMESPACE::brushForToolButton (bool isOnKeyWindow)
static bool QQC2_NAMESPACE::setupScroller (NSScroller *scroller, const QStyleOptionSlider *sb)
static bool QQC2_NAMESPACE::setupSlider (NSSlider *slider, const QStyleOptionSlider *sl)
QRect QQC2_NAMESPACE::rotateTabPainter (QPainter *p, QStyleOptionTab::Shape shape, QRect tabRect)
void QQC2_NAMESPACE::drawTabShape (QPainter *p, const QStyleOptionTab *tabOpt, bool isUnified, int tabOverlap)
void QQC2_NAMESPACE::drawTabBase (QPainter *p, const QStyleOptionTabBarBase *tbb)
static QStyleHelper::WidgetSizePolicy QQC2_NAMESPACE::getControlSize (const QStyleOption *option)
static QString QQC2_NAMESPACE::qt_mac_removeMnemonics (const QString &original)
static bool QQC2_NAMESPACE::qt_macWindowMainWindow (const QWindow *window)
static int QQC2_NAMESPACE::qt_mac_aqua_get_metric (QAquaMetric m)
static QSize QQC2_NAMESPACE::qt_aqua_get_known_size (QStyle::ContentsType ct, const QStyleOption *opt, QSize szHint, QStyleHelper::WidgetSizePolicy sz)
uint QQC2_NAMESPACE::qHash (const QMacStylePrivate::CocoaControl &cw, uint seed=0)
QMacStylePrivate::CocoaControlType QQC2_NAMESPACE::cocoaControlType (const QStyleOption *opt)
static QPixmap QQC2_NAMESPACE::darkenPixmap (const QPixmap &pixmap)
static void QQC2_NAMESPACE::setLayoutItemMargins (int left, int top, int right, int bottom, QRect *rect, Qt::LayoutDirection dir)

Variables

static const QColor QQC2_NAMESPACE::titlebarSeparatorLineActive (111, 111, 111)
static const QColor QQC2_NAMESPACE::titlebarSeparatorLineInactive (131, 131, 131)
static const QColor QQC2_NAMESPACE::darkModeSeparatorLine (88, 88, 88)
static const QColor QQC2_NAMESPACE::lightMainWindowGradientBegin (240, 240, 240)
static const QColor QQC2_NAMESPACE::lightMainWindowGradientEnd (200, 200, 200)
static const QColor QQC2_NAMESPACE::darkMainWindowGradientBegin (47, 47, 47)
static const QColor QQC2_NAMESPACE::darkMainWindowGradientEnd (47, 47, 47)
static const int QQC2_NAMESPACE::DisclosureOffset = 4
static const qreal QQC2_NAMESPACE::titleBarIconTitleSpacing = 5
static const qreal QQC2_NAMESPACE::titleBarTitleRightMargin = 12
static const qreal QQC2_NAMESPACE::titleBarButtonSpacing = 8
static const QColor QQC2_NAMESPACE::lightTabBarTabBackgroundActive (190, 190, 190)
static const QColor QQC2_NAMESPACE::darkTabBarTabBackgroundActive (38, 38, 38)
static const QColor QQC2_NAMESPACE::lightTabBarTabBackgroundActiveHovered (178, 178, 178)
static const QColor QQC2_NAMESPACE::darkTabBarTabBackgroundActiveHovered (32, 32, 32)
static const QColor QQC2_NAMESPACE::lightTabBarTabBackgroundActiveSelected (211, 211, 211)
static const QColor QQC2_NAMESPACE::darkTabBarTabBackgroundActiveSelected (52, 52, 52)
static const QColor QQC2_NAMESPACE::lightTabBarTabBackground (227, 227, 227)
static const QColor QQC2_NAMESPACE::darkTabBarTabBackground (38, 38, 38)
static const QColor QQC2_NAMESPACE::lightTabBarTabBackgroundSelected (246, 246, 246)
static const QColor QQC2_NAMESPACE::darkTabBarTabBackgroundSelected (52, 52, 52)
static const QColor QQC2_NAMESPACE::lightTabBarTabLineActive (160, 160, 160)
static const QColor QQC2_NAMESPACE::darkTabBarTabLineActive (90, 90, 90)
static const QColor QQC2_NAMESPACE::lightTabBarTabLineActiveHovered (150, 150, 150)
static const QColor QQC2_NAMESPACE::darkTabBarTabLineActiveHovered (90, 90, 90)
static const QColor QQC2_NAMESPACE::lightTabBarTabLine (210, 210, 210)
static const QColor QQC2_NAMESPACE::darkTabBarTabLine (90, 90, 90)
static const QColor QQC2_NAMESPACE::lightTabBarTabLineSelected (189, 189, 189)
static const QColor QQC2_NAMESPACE::darkTabBarTabLineSelected (90, 90, 90)
static const int QQC2_NAMESPACE::closeButtonSize = 14
static const int QQC2_NAMESPACE::headerSectionArrowHeight = 6
static const int QQC2_NAMESPACE::headerSectionSeparatorInset = 2
static const qreal QQC2_NAMESPACE::comboBoxDefaultHeight [3]
static const qreal QQC2_NAMESPACE::pushButtonDefaultHeight [3]
static const qreal QQC2_NAMESPACE::popupButtonDefaultHeight [3]
static const int QQC2_NAMESPACE::toolButtonArrowSize = 7
static const int QQC2_NAMESPACE::toolButtonArrowMargin = 2
static const qreal QQC2_NAMESPACE::focusRingWidth = 3.5
const int QQC2_NAMESPACE::macItemFrame = 2
const int QQC2_NAMESPACE::macItemHMargin = 3
const int QQC2_NAMESPACE::macRightBorder = 12
static const int QQC2_NAMESPACE::qt_mac_aqua_metrics []

Macro Definition Documentation

◆ LargeSmallMini

#define LargeSmallMini ( option,
large,
small,
mini )
Value:
(option->state & QStyle::State_Small) ? small : ((option->state & QStyle::State_Mini) ? mini : large)
PeripheralState state
@ State_Small
Definition qstyle.h:96
GLuint GLenum option

Definition at line 504 of file qquickmacstyle_mac.mm.

◆ QMAC_QAQUASTYLE_SIZE_CONSTRAIN

#define QMAC_QAQUASTYLE_SIZE_CONSTRAIN

Definition at line 18 of file qquickmacstyle_mac.mm.

◆ QQC2_MANGLE1

#define QQC2_MANGLE1 ( a,
b )
Value:
a##_##b
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a

Definition at line 49 of file qquickmacstyle_mac.mm.

◆ QQC2_MANGLE2

#define QQC2_MANGLE2 ( a,
b )
Value:
#define QQC2_MANGLE1(a, b)

Definition at line 50 of file qquickmacstyle_mac.mm.

◆ QT_MANGLE_NAMESPACE

#define QT_MANGLE_NAMESPACE ( name)
Value:

Definition at line 56 of file qquickmacstyle_mac.mm.

◆ QT_NAMESPACE_ALIAS_OBJC_CLASS

#define QT_NAMESPACE_ALIAS_OBJC_CLASS ( name)
Value:
@compatibility_alias name QT_MANGLE_NAMESPACE(name)
#define QT_MANGLE_NAMESPACE(name)

Definition at line 57 of file qquickmacstyle_mac.mm.

Function Documentation

◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [1/3]

QT_NAMESPACE_ALIAS_OBJC_CLASS ( QDarkNSBox )

◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [2/3]

QT_NAMESPACE_ALIAS_OBJC_CLASS ( QIndeterminateProgressIndicator )

◆ QT_NAMESPACE_ALIAS_OBJC_CLASS() [3/3]

QT_NAMESPACE_ALIAS_OBJC_CLASS ( QVerticalSplitView )