mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Ensure too-long popup menus have scroll buttons
This commit is contained in:
@@ -749,8 +749,7 @@ int RDStyle::styleHint(StyleHint stylehint, const QStyleOption *opt, const QWidg
|
||||
return 1;
|
||||
|
||||
if(stylehint == SH_Menu_FlashTriggeredItem || stylehint == SH_Menu_KeyboardSearch ||
|
||||
stylehint == SH_Menu_FadeOutOnHide || stylehint == SH_Menu_AllowActiveAndDisabled ||
|
||||
stylehint == SH_Menu_Scrollable)
|
||||
stylehint == SH_Menu_FadeOutOnHide || stylehint == SH_Menu_AllowActiveAndDisabled)
|
||||
return 0;
|
||||
|
||||
if(stylehint == SH_Menu_SubMenuPopupDelay || stylehint == SH_Menu_SubMenuSloppyCloseTimeout)
|
||||
|
||||
@@ -83,6 +83,15 @@ int RDTweakedNativeStyle::pixelMetric(PixelMetric metric, const QStyleOption *op
|
||||
return QProxyStyle::pixelMetric(metric, opt, widget);
|
||||
}
|
||||
|
||||
int RDTweakedNativeStyle::styleHint(StyleHint stylehint, const QStyleOption *opt,
|
||||
const QWidget *widget, QStyleHintReturn *returnData) const
|
||||
{
|
||||
if(stylehint == QStyle::SH_Menu_Scrollable)
|
||||
return 1;
|
||||
|
||||
return QProxyStyle::styleHint(stylehint, opt, widget, returnData);
|
||||
}
|
||||
|
||||
QIcon RDTweakedNativeStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *opt,
|
||||
const QWidget *widget) const
|
||||
{
|
||||
|
||||
@@ -41,6 +41,9 @@ public:
|
||||
const QWidget *widget) const override;
|
||||
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option = NULL,
|
||||
const QWidget *widget = NULL) const override;
|
||||
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt = NULL,
|
||||
const QWidget *widget = NULL,
|
||||
QStyleHintReturn *returnData = NULL) const override;
|
||||
virtual QIcon standardIcon(StandardPixmap standardIcon, const QStyleOption *option = NULL,
|
||||
const QWidget *widget = NULL) const override;
|
||||
virtual void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
|
||||
|
||||
Reference in New Issue
Block a user