[Plasmoid Heading] Draw the heading only when there is an SVG in the theme

Summary:
We're the only theme with the appropriate heading svgs that make the headers and footers look as they should.

All the other themes fall back to Breeze, which is not a good look for some of them:
- the heading is too jarring compared to applet background
- the heading does not extend all the way vertically and horizontally

To solve this, to avoid degrading unmaintained themes and to give themes a chance to adjust on their own terms, this patch makes the heading visible only when the needed SVG exists in the theme.

Test Plan:
Avoids this:
{F8276897}

{F8276896}

Breeze still works as it should.

Reviewers: #vdg, #plasma, niccolove, ngraham

Reviewed By: #vdg, niccolove, ngraham

Subscribers: ngraham, niccolove, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D29352
This commit is contained in:
Filip Fila 2020-05-01 23:49:26 +02:00
parent 8f1034fbe8
commit 1b1018e687

View File

@ -65,6 +65,7 @@ import QtQuick.Templates 2.12 as T
background: PlasmaCore.FrameSvgItem {
id: headingSvg
visible: fromCurrentTheme
imagePath: "widgets/plasmoidheading"
prefix: location == PlasmoidHeading.Location.Header? 'header' : 'footer'
}