2021-12-12 18:19:44 +02:00
|
|
|
#include "qt_styleoverride.hpp"
|
|
|
|
|
|
|
|
|
|
int StyleOverride::styleHint(
|
|
|
|
|
StyleHint hint,
|
|
|
|
|
const QStyleOption *option,
|
|
|
|
|
const QWidget *widget,
|
|
|
|
|
QStyleHintReturn *returnData) const
|
|
|
|
|
{
|
|
|
|
|
/* Disable using menu with alt key */
|
|
|
|
|
if (hint == QStyle::SH_MenuBar_AltKeyNavigation)
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
|
|
return QProxyStyle::styleHint(hint, option, widget, returnData);
|
2022-02-05 22:56:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void StyleOverride::polish(QWidget* widget)
|
|
|
|
|
{
|
|
|
|
|
/* Disable title bar context help buttons globally as they are unused. */
|
|
|
|
|
if (widget->isWindow())
|
|
|
|
|
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
|
2021-12-12 18:19:44 +02:00
|
|
|
}
|