mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Disable minimize/maximize/close buttons of simulator settings windows
This commit is contained in:
@@ -698,6 +698,17 @@ namespace BlackGui
|
||||
return mw;
|
||||
}
|
||||
|
||||
void CGuiUtility::disableMinMaxCloseButtons(QWidget *window)
|
||||
{
|
||||
if (!window->windowFlags().testFlag(Qt::CustomizeWindowHint))
|
||||
{
|
||||
window->setWindowFlag(Qt::CustomizeWindowHint);
|
||||
window->setWindowFlag(Qt::WindowTitleHint);
|
||||
}
|
||||
window->setWindowFlag(Qt::WindowMinMaxButtonsHint, false);
|
||||
window->setWindowFlag(Qt::WindowCloseButtonHint, false);
|
||||
}
|
||||
|
||||
QGraphicsOpacityEffect *CGuiUtility::fadeInWidget(int durationMs, QWidget *widget, double startValue, double endValue)
|
||||
{
|
||||
// http://stackoverflow.com/questions/19087822/how-to-make-qt-widgets-fade-in-or-fade-out#
|
||||
|
||||
@@ -222,6 +222,9 @@ namespace BlackGui
|
||||
static bool isDialog(const QWidget *widget);
|
||||
//! @}
|
||||
|
||||
//! Disable close button on window
|
||||
static void disableMinMaxCloseButtons(QWidget *window);
|
||||
|
||||
//! Fade in a widget
|
||||
static QGraphicsOpacityEffect *fadeInWidget(int durationMs, QWidget *widget, double startValue = 0.0, double endValue = 1.0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user