Some parts of plasma-framework could really use some changes to make them more flexible and intuitive.
PlasmaCore Dialog
- Should have no background by default or the background should be optional. Backgrounds should generally come from a PC3 or PlasmaExtras component instead.
- The problem with forcing a background by default is that we have no choice but to pile more backgrounds on top of that if we want to use different base background colors. For example, let's say we want to use a view background color for a view. It's fine to pile on more backgrounds if we're only using opaque backgrounds, but since we're using semi-transparent backgrounds, each new background increases the overall opacity. AFAIK, there's no way to just have a view background with normal opacity, which is why we never use view backgrounds in contexts where we should use them.
- Should not use read-only fixedMargins as the margins.
- We currently do some ugly stuff with negative padding/inset/anchor margins to get around the fixed margins. It's better for PC3 and PlasmaExtras components to set the margins.
PlasmaCore FrameSvgItem
- margins should default to 0, not fixedMargins. This behavior makes it so we have to write a lot more QML code to remain compatible with themes that don't use margins in some cases. Like so:
leftPadding: svg.hasElement(`${frameSvgItem.usedPrefix}-hint-left-margin`) ? contentItem.margins.left : horizontalPadding rightPadding: svg.hasElement(`${frameSvgItem.usedPrefix}-hint-right-margin`) ? contentItem.margins.right : horizontalPadding topPadding: svg.hasElement(`${frameSvgItem.usedPrefix}-hint-top-margin`) ? contentItem.margins.top : verticalPadding bottomPadding: svg.hasElement(`${frameSvgItem.usedPrefix}-hint-bottom-margin`) ? contentItem.margins.bottom : verticalPadding
- inset should default to 0, not -1. Negative inset is valid in QQC2, so this is just a bad default value.