From 6466f7f56c1bb831ddf1b7ca9820bfefb2163dad Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Sun, 10 Sep 2023 21:50:10 +0300 Subject: [PATCH] Ban anything that flickers or flashes on hover I don't like that. UI shouldn't jump in user's face like all these hover actions, bright backgrounds and random layout-shifting buttons out of nowhere. --- .../Timeline/LinkPreviewDelegate.qml | 2 +- src/qml/Component/Timeline/RichLabel.qml | 2 +- .../Component/Timeline/TimelineContainer.qml | 6 +---- src/qml/Component/TimelineView.qml | 3 ++- src/qml/Page/RoomList/RoomDelegate.qml | 23 +------------------ 5 files changed, 6 insertions(+), 30 deletions(-) diff --git a/src/qml/Component/Timeline/LinkPreviewDelegate.qml b/src/qml/Component/Timeline/LinkPreviewDelegate.qml index 9fab299ec..f656a5c09 100644 --- a/src/qml/Component/Timeline/LinkPreviewDelegate.qml +++ b/src/qml/Component/Timeline/LinkPreviewDelegate.qml @@ -108,7 +108,7 @@ Loader { id: maximizeButton anchors.right: parent.right anchors.bottom: parent.bottom - visible: componentRoot.hovered && (componentRoot.truncated || checked) + visible: false checkable: true icon.name: checked ? "go-up" : "go-down" diff --git a/src/qml/Component/Timeline/RichLabel.qml b/src/qml/Component/Timeline/RichLabel.qml index a9de8c5d4..ae4d99d01 100644 --- a/src/qml/Component/Timeline/RichLabel.qml +++ b/src/qml/Component/Timeline/RichLabel.qml @@ -103,7 +103,7 @@ a{ RoomManager.openResource(link) } onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") { - applicationWindow().hoverLinkIndicator.text = hoveredLink; + // applicationWindow().hoverLinkIndicator.text = hoveredLink; } else { applicationWindow().hoverLinkIndicator.text = ""; } diff --git a/src/qml/Component/Timeline/TimelineContainer.qml b/src/qml/Component/Timeline/TimelineContainer.qml index 394c23429..6b752a793 100644 --- a/src/qml/Component/Timeline/TimelineContainer.qml +++ b/src/qml/Component/Timeline/TimelineContainer.qml @@ -550,11 +550,7 @@ ColumnLayout { } } - background: Rectangle { - visible: mainContainer.hovered && (Config.compactLayout || root.alwaysMaxWidth) - color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15) - radius: Kirigami.Units.smallSpacing - } + background: Item {} TapHandler { acceptedDevices: PointerDevice.Mouse diff --git a/src/qml/Component/TimelineView.qml b/src/qml/Component/TimelineView.qml index 001101707..7910314f8 100644 --- a/src/qml/Component/TimelineView.qml +++ b/src/qml/Component/TimelineView.qml @@ -238,7 +238,8 @@ QQC2.ScrollView { width: delegate ? delegate.bubbleWidth : Kirigami.Units.gridUnit * 4 currentRoom: root.currentRoom - showActions: delegate && delegate.hovered + visible: false + showActions: false verified: delegate && delegate.verified editable: delegate && delegate.author.isLocalUser && (delegate.delegateType === DelegateType.Emote || delegate.delegateType === DelegateType.Message) diff --git a/src/qml/Page/RoomList/RoomDelegate.qml b/src/qml/Page/RoomList/RoomDelegate.qml index 02277fb56..a501ab59c 100644 --- a/src/qml/Page/RoomList/RoomDelegate.qml +++ b/src/qml/Page/RoomList/RoomDelegate.qml @@ -93,7 +93,7 @@ Delegates.RoundedItemDelegate { enabled: false implicitWidth: Kirigami.Units.iconSizes.smallMedium implicitHeight: Kirigami.Units.iconSizes.smallMedium - visible: currentRoom.pushNotificationState === PushNotificationState.Mute && !configButton.visible && !hasNotifications + visible: currentRoom.pushNotificationState === PushNotificationState.Mute && !hasNotifications Accessible.name: i18n("Muted room") Layout.rightMargin: Kirigami.Units.smallSpacing } @@ -122,16 +122,6 @@ Delegates.RoundedItemDelegate { text: notificationCountLabel.text } } - - QQC2.Button { - id: configButton - visible: root.hovered && !Kirigami.Settings.isMobile && !Config.compactRoomList - text: i18n("Configure room") - display: QQC2.Button.IconOnly - - icon.name: "configure" - onClicked: createRoomListContextMenu() - } } function createRoomListContextMenu() { @@ -139,17 +129,6 @@ Delegates.RoundedItemDelegate { const menu = component.createObject(root, { room: root.currentRoom, }); - if (!Kirigami.Settings.isMobile && !Config.compactRoomList) { - configButton.visible = true; - configButton.down = true; - } - menu.closed.connect(function() { - configButton.down = undefined; - configButton.visible = Qt.binding(() => { - return root.hovered && !Kirigami.Settings.isMobile - && !Config.compactRoomList; - }); - }) menu.open() } }