NTooltip: subtle gradient, NToggle: onEnter, onExited

This commit is contained in:
quadbyte 2025-08-12 23:04:43 -04:00
parent ce22559ee2
commit 5c9c61cf81
4 changed files with 20 additions and 14 deletions

View file

@ -22,7 +22,6 @@ ColumnLayout {
Layout.fillWidth: true
ColumnLayout {
id: mainColumn
spacing: Style.marginTiniest * scaling
Layout.fillWidth: true
@ -38,7 +37,6 @@ ColumnLayout {
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.textSecondary
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
}

View file

@ -19,7 +19,7 @@ PanelWindow {
}
function show() {
// Ensure only one panel is visible at a time using Settings as ephemeral store
// Ensure only one panel is visible at a time using PanelManager as ephemeral storage
try {
if (PanelManager.openedPanel && PanelManager.openedPanel !== root && PanelManager.openedPanel.hide) {
PanelManager.openedPanel.hide()

View file

@ -14,6 +14,8 @@ RowLayout {
property int baseSize: Style.baseWidgetSize
signal toggled(bool balue)
signal entered
signal exited
Layout.fillWidth: true
@ -69,8 +71,14 @@ RowLayout {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: hovering = true
onExited: hovering = false
onEntered: {
hovering = true
root.entered()
}
onExited: {
hovering = false
root.exited()
}
onClicked: {
value = !value
root.toggled(value)

View file

@ -101,15 +101,15 @@ Window {
anchors.fill: parent
radius: Style.radiusMedium * scaling
gradient: Gradient {
GradientStop {
position: 0.0
color: Colors.backgroundTertiary
}
GradientStop {
position: 1.0
color: Colors.backgroundSecondary
}
}
GradientStop {
position: 0.0
color: Colors.backgroundTertiary
}
GradientStop {
position: 1.0
color: Colors.backgroundSecondary
}
}
border.color: Colors.outline
border.width: Math.max(1, Style.borderThin * scaling)
z: 1