This allows the GUIUtil::ThemedLabel
class able to be used in UI form files. This is accomplished by introducing a form file friendly constructor which only takes in a QWidget* parent
.
You cannot pass in the platform_style
when initializing a GUIUtil::ThemedLabel
in a UI form file. This introduces a setPlatformStyle
function to be able to pass in the platform_style
at a later point.
Additionally; because we are not initializing the class with a platform_style
, we need to implement a check in updateThemedPixmap
so that it only executes when the m_platform_style
has been set. A segfault would occur without this conditional as a ChangeEvent
occurs on application start
This allows this class to be used in the form file for #330 for an elegant solution.