Reveal all hidden tooling when hovering over the center part of the bar
This commit is contained in:
@@ -39,6 +39,7 @@ Item {
|
|||||||
property bool requestedTransparent: false
|
property bool requestedTransparent: false
|
||||||
property bool useTransparentForeground: false
|
property bool useTransparentForeground: false
|
||||||
property bool transparent: false
|
property bool transparent: false
|
||||||
|
property bool centerSectionHovered: false
|
||||||
property int barConfigSerial: 0
|
property int barConfigSerial: 0
|
||||||
property string position: "top"
|
property string position: "top"
|
||||||
// Resolves through fontconfig at paint time (Style.font.family defaults
|
// Resolves through fontconfig at paint time (Style.font.family defaults
|
||||||
@@ -958,6 +959,10 @@ Item {
|
|||||||
|
|
||||||
CenterGestureArea { anchors.fill: parent }
|
CenterGestureArea { anchors.fill: parent }
|
||||||
|
|
||||||
|
HoverHandler {
|
||||||
|
onHoveredChanged: root.centerSectionHovered = hovered
|
||||||
|
}
|
||||||
|
|
||||||
ModuleList {
|
ModuleList {
|
||||||
visible: !centerRoot.hasAnchor
|
visible: !centerRoot.hasAnchor
|
||||||
entries: centerRoot.entries
|
entries: centerRoot.entries
|
||||||
@@ -986,6 +991,7 @@ Item {
|
|||||||
|
|
||||||
visible: centerRoot.hasAnchor && centerAnchorModule.moduleName === "omarchy.clock"
|
visible: centerRoot.hasAnchor && centerAnchorModule.moduleName === "omarchy.clock"
|
||||||
clockHovered: centerAnchorModule.hovered
|
clockHovered: centerAnchorModule.hovered
|
||||||
|
centerHovered: root.centerSectionHovered
|
||||||
anchors.right: centerAnchorModule.left
|
anchors.right: centerAnchorModule.left
|
||||||
anchors.verticalCenter: centerAnchorModule.verticalCenter
|
anchors.verticalCenter: centerAnchorModule.verticalCenter
|
||||||
}
|
}
|
||||||
@@ -1008,6 +1014,10 @@ Item {
|
|||||||
|
|
||||||
CenterGestureArea { anchors.fill: parent }
|
CenterGestureArea { anchors.fill: parent }
|
||||||
|
|
||||||
|
HoverHandler {
|
||||||
|
onHoveredChanged: root.centerSectionHovered = hovered
|
||||||
|
}
|
||||||
|
|
||||||
ModuleList {
|
ModuleList {
|
||||||
visible: !centerRoot.hasAnchor
|
visible: !centerRoot.hasAnchor
|
||||||
entries: centerRoot.entries
|
entries: centerRoot.entries
|
||||||
@@ -1036,6 +1046,7 @@ Item {
|
|||||||
|
|
||||||
visible: centerRoot.hasAnchor && centerAnchorModule.moduleName === "omarchy.clock"
|
visible: centerRoot.hasAnchor && centerAnchorModule.moduleName === "omarchy.clock"
|
||||||
clockHovered: centerAnchorModule.hovered
|
clockHovered: centerAnchorModule.hovered
|
||||||
|
centerHovered: root.centerSectionHovered
|
||||||
anchors.bottom: centerAnchorModule.top
|
anchors.bottom: centerAnchorModule.top
|
||||||
anchors.horizontalCenter: centerAnchorModule.horizontalCenter
|
anchors.horizontalCenter: centerAnchorModule.horizontalCenter
|
||||||
}
|
}
|
||||||
@@ -1066,11 +1077,12 @@ Item {
|
|||||||
id: configControl
|
id: configControl
|
||||||
|
|
||||||
property bool clockHovered: false
|
property bool clockHovered: false
|
||||||
|
property bool centerHovered: false
|
||||||
property bool openWhenReady: false
|
property bool openWhenReady: false
|
||||||
|
|
||||||
readonly property var panelItem: configPanelLoader.item
|
readonly property var panelItem: configPanelLoader.item
|
||||||
readonly property bool panelOpen: panelItem ? panelItem.opened === true : false
|
readonly property bool panelOpen: panelItem ? panelItem.opened === true : false
|
||||||
readonly property bool revealed: visible && (clockHovered || controlHover.hovered || panelOpen)
|
readonly property bool revealed: visible && (clockHovered || centerHovered || controlHover.hovered || panelOpen)
|
||||||
|
|
||||||
implicitWidth: button.implicitWidth
|
implicitWidth: button.implicitWidth
|
||||||
implicitHeight: button.implicitHeight
|
implicitHeight: button.implicitHeight
|
||||||
@@ -1340,6 +1352,7 @@ Item {
|
|||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
enabled: slot.visible && slot.width > 0 && slot.height > 0
|
enabled: slot.visible && slot.width > 0 && slot.height > 0
|
||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
|
cursorShape: slot.moduleName === "omarchy.clock" ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||||
// Do not assign drag.target here: ModuleSlot is owned by Row/Column
|
// Do not assign drag.target here: ModuleSlot is owned by Row/Column
|
||||||
// positioners, and mutating slot.x/slot.y can leave stale offsets that
|
// positioners, and mutating slot.x/slot.y can leave stale offsets that
|
||||||
// make neighboring modules overlap after a small aborted drag.
|
// make neighboring modules overlap after a small aborted drag.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ BarWidget {
|
|||||||
property bool indicatorAreaHovered: false
|
property bool indicatorAreaHovered: false
|
||||||
property bool indicatorItemHovered: false
|
property bool indicatorItemHovered: false
|
||||||
readonly property bool alwaysShowIndicators: setting("alwaysShow", false) === true
|
readonly property bool alwaysShowIndicators: setting("alwaysShow", false) === true
|
||||||
readonly property bool revealInactiveIndicators: alwaysShowIndicators || indicatorAreaHovered || indicatorItemHovered
|
readonly property bool revealInactiveIndicators: alwaysShowIndicators || indicatorAreaHovered || indicatorItemHovered || (bar && bar.centerSectionHovered === true)
|
||||||
|
|
||||||
signal refreshRequested()
|
signal refreshRequested()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user