mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Replaced all NWidgets callback by proper signals
This commit is contained in:
@@ -15,12 +15,13 @@ Rectangle {
|
||||
property bool showBorder: true
|
||||
property bool enabled: true
|
||||
property bool hovering: false
|
||||
property var onEntered: function () {}
|
||||
property var onExited: function () {}
|
||||
property var onClicked: function () {}
|
||||
property real fontPointSize: Style.fontSizeMedium
|
||||
property string fontFamily: "Material Symbols Outlined"
|
||||
|
||||
signal entered
|
||||
signal exited
|
||||
signal clicked
|
||||
|
||||
implicitWidth: size
|
||||
implicitHeight: size
|
||||
|
||||
@@ -62,20 +63,20 @@ Rectangle {
|
||||
if (tooltipText) {
|
||||
tooltip.show()
|
||||
}
|
||||
root.onEntered()
|
||||
root.entered()
|
||||
}
|
||||
onExited: {
|
||||
hovering = false
|
||||
if (tooltipText) {
|
||||
tooltip.hide()
|
||||
}
|
||||
root.onExited()
|
||||
root.exited()
|
||||
}
|
||||
onClicked: {
|
||||
if (tooltipText) {
|
||||
tooltip.hide()
|
||||
}
|
||||
root.onClicked()
|
||||
root.clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user