mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +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);
|
||||
return highDpi;
|
||||
}
|
||||
|
||||
void CGuiUtility::forceStyleSheetUpdate(QWidget *widget)
|
||||
{
|
||||
if (!widget) { return; }
|
||||
widget->setStyleSheet(widget->styleSheet());
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -167,6 +167,9 @@ namespace BlackGui
|
||||
//! Using high DPI screen support
|
||||
static bool isUsingHighDpiScreenSupport();
|
||||
|
||||
//! Forces a stylesheet update
|
||||
static void forceStyleSheetUpdate(QWidget *widget);
|
||||
|
||||
private:
|
||||
//! Constructor, use static methods only
|
||||
CGuiUtility() {}
|
||||
|
||||
Reference in New Issue
Block a user