mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
NIconButton/CustomButton: added an extra flag to allow click when the button is disabled.
Helps with custom button to get redirected to the settings
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user