small component patches + code cleanup

This commit is contained in:
SomeElse
2026-05-17 22:30:27 +00:00
parent 262fd8afa0
commit 6db876fc8a
21 changed files with 469 additions and 465 deletions

View File

@@ -107,16 +107,14 @@ ModuleChip {
implicitWidth: chipRow.implicitWidth + 24
height: Cfg.Config.moduleHeight
radius: panelRadius
color: chipHover.hovered ? t.netBgHover : t.netBg
border.color: chipHover.hovered ? t.netBorderHover : t.netBorder
border.width: borderWidth
Behavior on implicitWidth { NumberAnimation { duration: 250; easing.type: Easing.OutCubic } }
Behavior on color { ColorAnimation { duration: 150 } }
Behavior on border.color { ColorAnimation { duration: 150 } }
HoverHandler { id: chipHover; cursorShape: Qt.PointingHandCursor }
TapHandler { onTapped: netPopup.toggle() }
chipColor: t.netBg
chipColorHovered: t.netBgHover
chipBorderColor: t.netBorder
chipBorderColorHovered: t.netBorderHover
chipHoverEnabled: true
chipTapAction: () => netPopup.toggle()
chipAnimImplicitWidth: true
RowLayout {
id: chipRow
@@ -150,11 +148,15 @@ ModuleChip {
}
}
PopupPanel {
StandardPopup {
id: netPopup
ns: "network"
chipRoot: root
cardWidth: 310
cardColor: t.netPopupBg
cardBorderColor: t.netPopupBorder
cardHeight: cardBody.implicitHeight + 28
layerEnabled: true
function open() {
root.cancelConnect()
@@ -163,20 +165,8 @@ ModuleChip {
root.wifiDevice.scannerEnabled = true
}
PopupCard {
popupOpen: netPopup.popupOpen
isTop: root.isTop
animEnabled: netPopup.visible
height: cardBody.implicitHeight + 24
color: root.t.netPopupBg
radius: Cfg.Config.popupRadius
border.color: root.t.netPopupBorder
border.width: Cfg.Config.popupBorderWidth
layer.enabled: true
ColumnLayout {
id: cardBody
ColumnLayout {
id: cardBody
anchors {
left: parent.left
right: parent.right
@@ -655,6 +645,5 @@ ModuleChip {
Item { height: 4 }
}
}
}
}