Port away from using colorGroup property directly in svg items

SvgItem and FrameSvgItem automatically follow the colorSet of
Kirigami.Theme and to set a custom one the usual inherit api is used

https://invent.kde.org/frameworks/ksvg/-/merge_requests/22 removes those properties
This commit is contained in:
Marco Martin 2023-09-05 16:18:47 +00:00
parent cc50aee72d
commit d719f407dd
5 changed files with 15 additions and 11 deletions

View file

@ -59,7 +59,8 @@ Item {
NavigationPanelButton { NavigationPanelButton {
id: leftButton id: leftButton
visible: root.leftAction.visible visible: root.leftAction.visible
colorGroup: root.foregroundColorGroup Kirigami.Theme.colorSet: root.foregroundColorGroup
Kirigami.Theme.inherit: false
enabled: root.leftAction.enabled enabled: root.leftAction.enabled
iconSizeFactor: root.leftAction.iconSizeFactor iconSizeFactor: root.leftAction.iconSizeFactor
iconSource: root.leftAction.iconSource iconSource: root.leftAction.iconSource
@ -74,7 +75,8 @@ Item {
id: middleButton id: middleButton
anchors.centerIn: parent anchors.centerIn: parent
visible: root.middleAction.visible visible: root.middleAction.visible
colorGroup: root.foregroundColorGroup Kirigami.Theme.colorSet: root.foregroundColorGroup
Kirigami.Theme.inherit: false
enabled: root.middleAction.enabled enabled: root.middleAction.enabled
iconSizeFactor: root.middleAction.iconSizeFactor iconSizeFactor: root.middleAction.iconSizeFactor
iconSource: root.middleAction.iconSource iconSource: root.middleAction.iconSource
@ -88,7 +90,8 @@ Item {
NavigationPanelButton { NavigationPanelButton {
id: rightButton id: rightButton
visible: root.rightAction.visible visible: root.rightAction.visible
colorGroup: root.foregroundColorGroup Kirigami.Theme.colorSet: root.foregroundColorGroup
Kirigami.Theme.inherit: false
enabled: root.rightAction.enabled enabled: root.rightAction.enabled
iconSizeFactor: root.rightAction.iconSizeFactor iconSizeFactor: root.rightAction.iconSizeFactor
iconSource: root.rightAction.iconSource iconSource: root.rightAction.iconSource
@ -102,7 +105,8 @@ Item {
NavigationPanelButton { NavigationPanelButton {
id: rightCornerButton id: rightCornerButton
visible: root.rightCornerAction.visible visible: root.rightCornerAction.visible
colorGroup: root.foregroundColorGroup Kirigami.Theme.colorSet: root.foregroundColorGroup
Kirigami.Theme.inherit: false
enabled: root.rightCornerAction.enabled enabled: root.rightCornerAction.enabled
iconSizeFactor: root.rightCornerAction.iconSizeFactor iconSizeFactor: root.rightCornerAction.iconSizeFactor
iconSource: root.rightCornerAction.iconSource iconSource: root.rightCornerAction.iconSource

View file

@ -20,7 +20,6 @@ Controls.AbstractButton {
property double iconSizeFactor: 1 property double iconSizeFactor: 1
property alias iconSource: icon.source property alias iconSource: icon.source
property alias colorGroup: icon.colorGroup
Rectangle { Rectangle {
id: rect id: rect

View file

@ -16,10 +16,11 @@ KSvg.SvgItem {
z: 2 z: 2
opacity: 0 opacity: 0
svg: KSvg.Svg {
imagePath: "widgets/arrows" Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
colorGroup: Kirigami.Theme.ComplementaryColorGroup Kirigami.Theme.inherit: false
}
imagePath: "widgets/arrows"
elementId: "left-arrow" elementId: "left-arrow"
width: Kirigami.Units.iconSizes.large width: Kirigami.Units.iconSizes.large
height: width height: width

View file

@ -25,7 +25,7 @@ MobileShell.NavigationPanel {
// - translucent if the task switcher is open // - translucent if the task switcher is open
// - transparent if on the homescreen // - transparent if on the homescreen
backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent"; backgroundColor: (Keyboards.KWinVirtualKeyboard.visible || opaqueBar) ? Kirigami.Theme.backgroundColor : "transparent";
foregroundColorGroup: opaqueBar ? PlasmaCore.Theme.NormalColorGroup : PlasmaCore.Theme.ComplementaryColorGroup foregroundColorGroup: opaqueBar ? Kirigami.Theme.Window : Kirigami.Theme.Complementary
shadow: !opaqueBar shadow: !opaqueBar
TaskManager.VirtualDesktopInfo { TaskManager.VirtualDesktopInfo {

View file

@ -161,7 +161,7 @@ FocusScope {
z: 1 z: 1
visible: ShellSettings.Settings.navigationPanelEnabled visible: ShellSettings.Settings.navigationPanelEnabled
backgroundColor: Qt.rgba(0, 0, 0, 0.1) backgroundColor: Qt.rgba(0, 0, 0, 0.1)
foregroundColorGroup: PlasmaCore.Theme.ComplementaryColorGroup foregroundColorGroup: Kirigami.Theme.Complementary
shadow: false shadow: false
leftAction: MobileShell.NavigationPanelAction { leftAction: MobileShell.NavigationPanelAction {