mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
Ref T225, utility function to force stylesheet update
* Needed when setting UI element to readonly, and stylesheet is different for readonly * see https://stackoverflow.com/q/48141205/356726
This commit is contained in:
@@ -504,4 +504,10 @@ namespace BlackGui
|
|||||||
const bool highDpi = stringToBool(vs);
|
const bool highDpi = stringToBool(vs);
|
||||||
return highDpi;
|
return highDpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGuiUtility::forceStyleSheetUpdate(QWidget *widget)
|
||||||
|
{
|
||||||
|
if (!widget) { return; }
|
||||||
|
widget->setStyleSheet(widget->styleSheet());
|
||||||
|
}
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -167,6 +167,9 @@ namespace BlackGui
|
|||||||
//! Using high DPI screen support
|
//! Using high DPI screen support
|
||||||
static bool isUsingHighDpiScreenSupport();
|
static bool isUsingHighDpiScreenSupport();
|
||||||
|
|
||||||
|
//! Forces a stylesheet update
|
||||||
|
static void forceStyleSheetUpdate(QWidget *widget);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Constructor, use static methods only
|
//! Constructor, use static methods only
|
||||||
CGuiUtility() {}
|
CGuiUtility() {}
|
||||||
|
|||||||
Reference in New Issue
Block a user