So while i was able to make the erroneus styling disappear i am not fully satisfied with cleaning up the now unused code. Is the QSint initial styling neccessary at all?When the taskview is drawn for the first time without changing the workbench (like having PartDesign or Robot as your launch workbench) it would be drawn with hardcoded styling from the original Qsint stuff.
The colors would be correct when switching between workbenches or re-applying a stylesheet.
Removing all calls of setStylesSheet() for the initial draw of taskheader and taskview makes it load with the correct styling:
I was able to completely delete the TaskGroup::setScheme method, which only set the stylesheet, but the TaskHeader::setScheme method is still required as FreeCAD does not load with it removed, so only the setStyleSheet() call was removed here. I would have liked to remove all hardcoded initial stylings but right now i can't get it to work.
I could not find an existing issue ticket for this.
After this change we shouldn't be touching the "ActionBoxStyle" hardcoded stylesheets in actionbox.cpp / macpanelscheme.cpp etc. which are only used for the initial default stylings.
Taskgroup_p.cpp only ever set this hardcoded stylesheet in its setScheme() so this call and function could be removed completely:
Taskheader_p.cpp does more in its SetScheme() so i wasn't able to remove it completely:
This means Taskheader_p.cpp still pulls the headerSize from defaultScheme() which traces back to hardcoded QSint stuff like actionpanelscheme.cpp where headerSize is hardcoded again.
I take it it isn't possible to put the headerSize etc. in our stylesheets?
If it's just the header size that gets pulled from defaultScheme at this position i might be able to at least hardcode it instead of the taskheader_p.cpp setScheme() call so we might be able to remove more of the hardcoded qsint styles, but i don't know if it is even preferable to remove that code? Do we need that as a fallback or for future new windows?
Sorry for sounding confusing and/or confused. I am still very much wrapping my head around the FreeCAD source. Picking smaller bugs (or what i think are smaller bugs) to learn how to navigate FreeCAD.