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:
parent
6837f0355a
commit
28560ec596
@ -16,7 +16,7 @@ import QtQuick.Templates 2.12 as T
|
|||||||
* @inherit QtQuick.Templates.Frame
|
* @inherit QtQuick.Templates.Frame
|
||||||
*/
|
*/
|
||||||
T.Frame {
|
T.Frame {
|
||||||
|
id: control
|
||||||
/**
|
/**
|
||||||
* Possible positions of the heading element
|
* 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
|
topInset: location == PlasmoidHeading.Location.Footer ? 0 : -headingSvg.fixedMargins.top
|
||||||
bottomInset: location == PlasmoidHeading.Location.Footer ? -headingSvg.fixedMargins.bottom : 0
|
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 {
|
background: PlasmaCore.FrameSvgItem {
|
||||||
id: headingSvg
|
id: headingSvg
|
||||||
visible: fromCurrentTheme
|
visible: fromCurrentTheme
|
||||||
imagePath: "widgets/plasmoidheading"
|
imagePath: "widgets/plasmoidheading"
|
||||||
prefix: location == PlasmoidHeading.Location.Header? 'header' : 'footer'
|
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
|
PlasmaCore.ColorScope.inherit: false
|
||||||
|
|
||||||
enabledBorders: {
|
enabledBorders: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user