diff --git a/Commons/Bootstrap.qml b/Commons/Bootstrap.qml index 8df065c..459172c 100644 --- a/Commons/Bootstrap.qml +++ b/Commons/Bootstrap.qml @@ -41,7 +41,7 @@ Singleton { } } - property var icons: { + readonly property var icons: { "alarm-fill": "\uF101", "alarm": "\uF102", "align-bottom": "\uF103", diff --git a/Modules/Bar/Widgets/CustomButton.qml b/Modules/Bar/Widgets/CustomButton.qml index ab1868b..8027135 100644 --- a/Modules/Bar/Widgets/CustomButton.qml +++ b/Modules/Bar/Widgets/CustomButton.qml @@ -38,6 +38,8 @@ NIconButton { readonly property string middleClickExec: widgetSettings.middleClickExec || widgetMetadata.middleClickExec readonly property bool hasExec: (leftClickExec || rightClickExec || middleClickExec) + enabled: hasExec + allowClickWhenDisabled: true // we want to be able to open config with left click when its not setup properly colorBorder: Color.transparent colorBorderHover: Color.transparent sizeRatio: 0.8 @@ -59,7 +61,6 @@ NIconButton { return lines.join("
") } } - opacity: hasExec ? Style.opacityFull : Style.opacityMedium onClicked: { if (leftClickExec) { diff --git a/Widgets/NIconButton.qml b/Widgets/NIconButton.qml index 296279e..efbd8e9 100644 --- a/Widgets/NIconButton.qml +++ b/Widgets/NIconButton.qml @@ -14,6 +14,7 @@ Rectangle { property string icon property string tooltipText property bool enabled: true + property bool allowClickWhenDisabled: false property bool hovering: false property color colorBg: Color.mSurfaceVariant @@ -94,7 +95,7 @@ Rectangle { if (tooltipText) { tooltip.hide() } - if (!root.enabled) { + if (!root.enabled && !allowClickWhenDisabled) { return } if (mouse.button === Qt.LeftButton) {