Commit 0c0d2f25 authored by Marco Martin's avatar Marco Martin

port to kirigami imagecolors

parent 34dfc3f8
......@@ -23,7 +23,7 @@ import QtGraphicalEffects 1.12
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 3.0 as PlasmaComponents
import org.kde.kirigami 2.11 as Kirigami
import org.kde.kirigami 2.13 as Kirigami
import org.kde.mycroft.bigscreen 1.0 as BigScreen
AbstractDelegate {
......@@ -42,14 +42,14 @@ AbstractDelegate {
Kirigami.Theme.backgroundColor: imagePalette.backgroundColor
Kirigami.Theme.highlightColor: imagePalette.accentColor
BigScreen.ImagePalette {
Kirigami.ImageColors {
id: imagePalette
source: iconItem.source
property bool useColors: useIconColors
property color backgroundColor: useColors ? suggestedContrast : PlasmaCore.ColorScope.backgroundColor
property color accentColor: useColors ? mostSaturated : PlasmaCore.ColorScope.highlightColor
property color backgroundColor: useColors ? dominantContrast : PlasmaCore.ColorScope.backgroundColor
property color accentColor: useColors ? highlight : PlasmaCore.ColorScope.highlightColor
property color textColor: useColors
? (0.2126 * suggestedContrast.r + 0.7152 * suggestedContrast.g + 0.0722 * suggestedContrast.b > 0.6 ? Qt.rgba(0.2,0.2,0.2,1) : Qt.rgba(0.9,0.9,0.9,1))
? Kirigami.ColorUtils.brightness(dominantContrast) === Kirigami.ColorUtils.Light ? imagePalette.closestToBlack : imagePalette.closestToWhite
: PlasmaCore.ColorScope.textColor
}
......
......@@ -25,13 +25,12 @@ import org.kde.plasma.plasmoid 2.0
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.kquickcontrolsaddons 2.0
import org.kde.private.biglauncher 1.0 as Launcher
import org.kde.mycroft.bigscreen 1.0 as Launcher
import org.kde.kirigami 2.11 as Kirigami
import org.kde.kitemmodels 1.0 as KItemModels
import "delegates" as Delegates
import org.kde.mycroft.bigscreen 1.0 as BigScreen
import org.kde.private.biglauncher 1.0
import org.kde.plasma.private.kicker 0.1 as Kicker
FocusScope {
......
......@@ -27,7 +27,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.components 3.0 as PlasmaComponents3
import org.kde.kquickcontrolsaddons 2.0
import org.kde.private.biglauncher 1.0 as Launcher
import org.kde.mycroft.bigscreen 1.0 as Launcher
import org.kde.kirigami 2.5 as Kirigami
FocusScope {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment