Set PlasmoidHeading colorGroup in root element

This makes it so any child elements inherit the colorGroup if they are
capable of doing so.
This commit is contained in:
Noah Davis 2020-10-09 00:00:17 -04:00
parent 6837f0355a
commit 28560ec596

View File

@ -16,7 +16,7 @@ import QtQuick.Templates 2.12 as T
* @inherit QtQuick.Templates.Frame
*/
T.Frame {
id: control
/**
* Possible positions of the heading element
*/
@ -50,13 +50,15 @@ import QtQuick.Templates 2.12 as T
topInset: location == PlasmoidHeading.Location.Footer ? 0 : -headingSvg.fixedMargins.top
bottomInset: location == PlasmoidHeading.Location.Footer ? -headingSvg.fixedMargins.bottom : 0
PlasmaCore.ColorScope.colorGroup: location == PlasmoidHeading.Location.Header ? PlasmaCore.Theme.HeaderColorGroup : PlasmaCore.Theme.WindowColorGroup
background: PlasmaCore.FrameSvgItem {
id: headingSvg
visible: fromCurrentTheme
imagePath: "widgets/plasmoidheading"
prefix: location == PlasmoidHeading.Location.Header? 'header' : 'footer'
colorGroup: location == PlasmoidHeading.Location.Header ? PlasmaCore.Theme.HeaderColorGroup : PlasmaCore.Theme.WindowColorGroup
colorGroup: control.PlasmaCore.ColorScope.colorGroup
PlasmaCore.ColorScope.inherit: false
enabledBorders: {