mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-11 07:48:26 -05:00
This hides the cursor from the OBSHotkeyEdit spin boxes even when they are in focus. Uses a shared style owned by OBSApp.
26 lines
655 B
C++
26 lines
655 B
C++
#include "OBSProxyStyle.hpp"
|
|
#include "moc_OBSProxyStyle.cpp"
|
|
|
|
int OBSProxyStyle::styleHint(StyleHint hint, const QStyleOption *option, const QWidget *widget,
|
|
QStyleHintReturn *returnData) const
|
|
{
|
|
if (hint == SH_ComboBox_AllowWheelScrolling)
|
|
return 0;
|
|
#ifdef __APPLE__
|
|
if (hint == SH_ComboBox_UseNativePopup)
|
|
return 1;
|
|
#endif
|
|
|
|
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
|
}
|
|
|
|
int OBSInvisibleCursorProxyStyle::pixelMetric(PixelMetric metric, const QStyleOption *option,
|
|
const QWidget *widget) const
|
|
{
|
|
|
|
if (metric == PM_TextCursorWidth)
|
|
return 0;
|
|
|
|
return QProxyStyle::pixelMetric(metric, option, widget);
|
|
}
|