Skip to content

KTitleWidget: do not autofillbackround by default, drop StyledPanel frame

The use of autofillbackround is inconsistent in behaviour of a plain QLabel (which could be considered a sibling widget type), that paints the text or pixmap simply onto whatever background the container widget uses.
Both Breeze & Oxygen even have special code to overwrite this.

ba2252ec before tried to work-around the visual effects in prominent usages by defaulting to another backgroundRole (Base -> Window) but that just moved issues to other usages with other container backgrounds.

The hard-coded use of a StyledPanel frame also is not in balance with the default QLabel behaviour. With both Breeze & Oxygen both drawing nothing with StyledPanel, other than other styles, a frame around the title widget might come as surprise there when implementing the UI with KTitleWidget. And since d3964629 changed the contents margins to 0, any frame also runs right next to the content, which would be usually not part of a design.

Given the similarity of QLabel & KTitleWidget and the initial use of StyledPanel frame, perhaps KTitleWidget should subclass QFrame rather on next occasion. But that is more in principle, seems current users are fine with the no-frame nature.

Merge request reports

Loading