Files
86Box/src/qt/qt_styleoverride.cpp

39 lines
1.0 KiB
C++
Raw Normal View History

2022-02-07 15:00:02 +06:00
/*
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the 86Box distribution.
*
* Style override class.
*
*
*
* Authors: Teemu Korhonen
*
* Copyright 2022 Teemu Korhonen
*/
#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);
}
void StyleOverride::polish(QWidget* widget)
{
2022-02-08 15:50:56 +06:00
QProxyStyle::polish(widget);
/* Disable title bar context help buttons globally as they are unused. */
if (widget->isWindow())
widget->setWindowFlag(Qt::WindowContextHelpButtonHint, false);
2022-02-07 15:00:02 +06:00
}