plasma-framework improvements / breaking changes
Open, NormalPublic

Description

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.
ndavis created this task.Oct 18 2021, 12:32 AM
  • Delete the Air theme (maybe move it into GHNS and have it live in the vdg-extras repo)
  • Move the Oxygen theme into the Oxygen repo
  • Move the Breeze theme into the Breeze theme
  • Delete PlasmaComponents2
ngraham added a comment.EditedOct 18 2021, 12:40 AM
  • Delete PlasmaComponents3 and make SVG Plasma styling (if it is kept) get applied via a simple QQC2 style
  • Delete PlasmaComponents3 and make SVG Plasma styling (if it is kept) get applied via a simple QQC2 style

SVG styling is useful for making complex graphics, so I think it should be kept. Maybe it shouldn't be the primary choice for basic graphics though.

right, gotta keep on topic in my own task

quick note regarding inset: -1 was chosen for compatibility, but obv that won't matter for kf6 :)

Should have no background by default or the background should be optional. Backgrounds should generally come from a PC3 or PlasmaExtras component instead.

big +1 for that one. I really think we should have Representation or a similar component manage negotiation with containments. Ideally containments should never provide backgrounds and just hint to the applet what it should look like, that way we'll have a lot more flexibility over applets appearance. The downside of that approach is that any new containment would have to make changes to plasma-framework, but imo that's a worthwhile compromise. Also that would make Representation responsible for doing funky stuff like that combined header thing in systray.

I wonder what @mart has to say on this

Is there anything actionable or worth discussing here that wasn't addressed elsewhere?

mart added a comment.Jul 10 2023, 2:50 PM

status:

  • Replacement for Dialog is in progress
  • Issues of FrameSvgItem are still valid on KSvg's FrameSgItem
mart triaged this task as Normal priority.Jul 10 2023, 2:50 PM