Closed BigRoy closed 4 years ago
I traced it down to this single line of code. Removing this setStyleSheet
on the QSplitter
preserves the full styling but of course adds back the border around the splitter.
This hack seems to work:
# In Maya 2020 when only setting the QSplitter stylesheet
# all children lose any of their other styling. As such
# we force all styling again and then add our override.
sheet = style.load_stylesheet()
sheet += "\nQSplitter { border:0px; }"
split.setStyleSheet(sheet)
Or, we force the Avalon stylesheet to just have a zero border for QSplitter by default, adding the following to style/style.qss
:
QSplitter {
border: 0px;
}
And then removing the explicit override on this QSplitter instance.
QSplitter has no current CSS applied in the style.qss
so it would be the first definition for it.
Both seem to work.
The latter seems most trivial and logical, but I am not sure we want to have QSplitter to default to no border.
Any opinions?
Another proposed solution is setting a QObject property and let the style/style.qss
stylesheet use that:
QSplitter[noborder="true"] {
border: 0px;
}
And then instead of applying a stylesheet on the QSplitter we just set the property:
split.setProperty("noborder", True)
Of course the name of the property can be anything, like loaderSplitter
. So this would potentially be option 3.
What happened?
The Loader in Maya 2020 seems to have a very different styling, as if Maya now overrides it. I'm not noticing similar differences in other Maya tools, only on the loader.
What did you expect?
This should resemble more the original styling as when run Standalone or like in Maya 2019:
To Reproduce
Open the Loader in Maya 2020.
Reference: