forked from Shinonome/dots-hyprland
dock: monochrome icons
This commit is contained in:
@@ -135,6 +135,7 @@ Singleton {
|
|||||||
|
|
||||||
property JsonObject dock: JsonObject {
|
property JsonObject dock: JsonObject {
|
||||||
property bool enable: false
|
property bool enable: false
|
||||||
|
property bool monochromeIcons: true
|
||||||
property real height: 60
|
property real height: 60
|
||||||
property real hoverRegionHeight: 2
|
property real hoverRegionHeight: 2
|
||||||
property bool pinnedOnStartup: false
|
property bool pinnedOnStartup: false
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import "root:/services"
|
|||||||
import "root:/modules/common"
|
import "root:/modules/common"
|
||||||
import "root:/modules/common/widgets"
|
import "root:/modules/common/widgets"
|
||||||
import "root:/modules/common/functions/color_utils.js" as ColorUtils
|
import "root:/modules/common/functions/color_utils.js" as ColorUtils
|
||||||
|
import Qt5Compat.GraphicalEffects
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
@@ -91,6 +92,25 @@ DockButton {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
active: Config.options.dock.monochromeIcons
|
||||||
|
anchors.fill: iconImageLoader
|
||||||
|
sourceComponent: Item {
|
||||||
|
Desaturate {
|
||||||
|
id: desaturatedIcon
|
||||||
|
visible: false // There's already color overlay
|
||||||
|
anchors.fill: parent
|
||||||
|
source: iconImageLoader
|
||||||
|
desaturation: 0.8
|
||||||
|
}
|
||||||
|
ColorOverlay {
|
||||||
|
anchors.fill: desaturatedIcon
|
||||||
|
source: desaturatedIcon
|
||||||
|
color: ColorUtils.transparentize(Appearance.colors.colPrimary, 0.9)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
spacing: 3
|
spacing: 3
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
Reference in New Issue
Block a user