follow colorscope

This commit is contained in:
Marco Martin 2018-09-24 18:13:50 +02:00
parent 938b9cc1a1
commit f6008dafc4
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import QtQuick 2.6
import QtQuick.Layouts 1.2 import QtQuick.Layouts 1.2
import QtQuick.Templates @QQC2_VERSION@ as T import QtQuick.Templates @QQC2_VERSION@ as T
import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.5 as Kirigami
import "private" as Private import "private" as Private
T.Button { T.Button {
@ -35,12 +36,13 @@ T.Button {
rightPadding: surfaceNormal.margins.right rightPadding: surfaceNormal.margins.right
bottomPadding: surfaceNormal.margins.bottom bottomPadding: surfaceNormal.margins.bottom
hoverEnabled: true //Qt.styleHints.useHoverEffects TODO: how to make this work in 5.7? hoverEnabled: !Kirigami.Settings.isMobile
contentItem: RowLayout { contentItem: RowLayout {
PlasmaCore.IconItem { PlasmaCore.IconItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
colorGroup: PlasmaCore.ColorScope.colorGroup
visible: source.length > 0 visible: source.length > 0
source: control.icon ? (control.icon.name || control.icon.source) : "" source: control.icon ? (control.icon.name || control.icon.source) : ""
} }

View File

@ -44,6 +44,7 @@ T.ToolButton {
PlasmaCore.IconItem { PlasmaCore.IconItem {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
colorGroup: PlasmaCore.ColorScope.colorGroup
visible: source.length > 0 visible: source.length > 0
source: control.icon ? (control.icon.name || control.icon.source) : "" source: control.icon ? (control.icon.name || control.icon.source) : ""
} }