QStyle: deprecate PM_DialogButtons* enums
The threee enumerations - PM_DialogButtonsSeparator - PM_DialogButtonsButtonWidth - PM_DialogButtonsButtonHeight Are not documented since Qt3 times and also not used anywhere. Therefore deprecated them and remove the logic to handle them. Change-Id: Ia59fe15482e744123e7fbf04b8d44661afb58b5c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>bb10
parent
960867566a
commit
d77ba8cb59
|
|
@ -2156,25 +2156,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
|
|||
case PM_FocusFrameHMargin:
|
||||
ret = qt_mac_aqua_get_metric(FocusRectOutset);
|
||||
break;
|
||||
case PM_DialogButtonsSeparator:
|
||||
ret = -5;
|
||||
break;
|
||||
case PM_DialogButtonsButtonHeight: {
|
||||
QSize sz;
|
||||
ret = d->aquaSizeConstrain(opt, 0, QStyle::CT_PushButton, QSize(-1, -1), &sz);
|
||||
if (sz == QSize(-1, -1))
|
||||
ret = 32;
|
||||
else
|
||||
ret = sz.height();
|
||||
break; }
|
||||
case PM_DialogButtonsButtonWidth: {
|
||||
QSize sz;
|
||||
ret = d->aquaSizeConstrain(opt, 0, QStyle::CT_PushButton, QSize(-1, -1), &sz);
|
||||
if (sz == QSize(-1, -1))
|
||||
ret = 70;
|
||||
else
|
||||
ret = sz.width();
|
||||
break; }
|
||||
|
||||
case PM_MenuBarHMargin:
|
||||
ret = 8;
|
||||
|
|
|
|||
|
|
@ -4521,15 +4521,6 @@ int QCommonStyle::pixelMetric(PixelMetric m, const QStyleOption *opt, const QWid
|
|||
case PM_MenuBarHMargin:
|
||||
ret = 0;
|
||||
break;
|
||||
case PM_DialogButtonsSeparator:
|
||||
ret = int(QStyleHelper::dpiScaled(5, opt));
|
||||
break;
|
||||
case PM_DialogButtonsButtonWidth:
|
||||
ret = int(QStyleHelper::dpiScaled(70, opt));
|
||||
break;
|
||||
case PM_DialogButtonsButtonHeight:
|
||||
ret = int(QStyleHelper::dpiScaled(30, opt));
|
||||
break;
|
||||
case PM_TitleBarHeight:
|
||||
{
|
||||
if (const QStyleOptionTitleBar *tb = qstyleoption_cast<const QStyleOptionTitleBar *>(opt)) {
|
||||
|
|
|
|||
|
|
@ -2926,7 +2926,6 @@ int QFusionStyle::pixelMetric(PixelMetric metric, const QStyleOption *option, co
|
|||
case PM_ListViewIconSize:
|
||||
val = 24;
|
||||
break;
|
||||
case PM_DialogButtonsSeparator:
|
||||
case PM_ScrollBarSliderMin:
|
||||
val = 26;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -464,11 +464,13 @@ public:
|
|||
PM_ExclusiveIndicatorWidth,
|
||||
PM_ExclusiveIndicatorHeight,
|
||||
|
||||
PM_DialogButtonsSeparator,
|
||||
PM_DialogButtonsButtonWidth,
|
||||
PM_DialogButtonsButtonHeight,
|
||||
#if QT_DEPRECATED_SINCE(6, 8)
|
||||
PM_DialogButtonsSeparator Q_DECL_ENUMERATOR_DEPRECATED_X("Not used and no effect since Qt 4"),
|
||||
PM_DialogButtonsButtonWidth Q_DECL_ENUMERATOR_DEPRECATED_X("Not used and no effect since Qt 4"),
|
||||
PM_DialogButtonsButtonHeight Q_DECL_ENUMERATOR_DEPRECATED_X("Not used and no effect since Qt 4"),
|
||||
#endif
|
||||
|
||||
PM_MdiSubWindowFrameWidth,
|
||||
PM_MdiSubWindowFrameWidth = 44,
|
||||
PM_MdiSubWindowMinimizedWidth,
|
||||
|
||||
PM_HeaderMargin,
|
||||
|
|
|
|||
Loading…
Reference in New Issue