Compare commits

...

1 Commits

Author SHA1 Message Date
ivan tkachenko
6466f7f56c 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.
2023-09-10 21:59:45 +03:00
5 changed files with 6 additions and 30 deletions

View File

@@ -108,7 +108,7 @@ Loader {
id: maximizeButton id: maximizeButton
anchors.right: parent.right anchors.right: parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
visible: componentRoot.hovered && (componentRoot.truncated || checked) visible: false
checkable: true checkable: true
icon.name: checked ? "go-up" : "go-down" icon.name: checked ? "go-up" : "go-down"

View File

@@ -103,7 +103,7 @@ a{
RoomManager.openResource(link) RoomManager.openResource(link)
} }
onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") { onHoveredLinkChanged: if (hoveredLink.length > 0 && hoveredLink !== "1") {
applicationWindow().hoverLinkIndicator.text = hoveredLink; // applicationWindow().hoverLinkIndicator.text = hoveredLink;
} else { } else {
applicationWindow().hoverLinkIndicator.text = ""; applicationWindow().hoverLinkIndicator.text = "";
} }

View File

@@ -550,11 +550,7 @@ ColumnLayout {
} }
} }
background: Rectangle { background: Item {}
visible: mainContainer.hovered && (Config.compactLayout || root.alwaysMaxWidth)
color: Kirigami.ColorUtils.tintWithAlpha(Kirigami.Theme.backgroundColor, Kirigami.Theme.highlightColor, 0.15)
radius: Kirigami.Units.smallSpacing
}
TapHandler { TapHandler {
acceptedDevices: PointerDevice.Mouse acceptedDevices: PointerDevice.Mouse

View File

@@ -238,7 +238,8 @@ QQC2.ScrollView {
width: delegate ? delegate.bubbleWidth : Kirigami.Units.gridUnit * 4 width: delegate ? delegate.bubbleWidth : Kirigami.Units.gridUnit * 4
currentRoom: root.currentRoom currentRoom: root.currentRoom
showActions: delegate && delegate.hovered visible: false
showActions: false
verified: delegate && delegate.verified verified: delegate && delegate.verified
editable: delegate && delegate.author.isLocalUser && (delegate.delegateType === DelegateType.Emote || delegate.delegateType === DelegateType.Message) editable: delegate && delegate.author.isLocalUser && (delegate.delegateType === DelegateType.Emote || delegate.delegateType === DelegateType.Message)

View File

@@ -93,7 +93,7 @@ Delegates.RoundedItemDelegate {
enabled: false enabled: false
implicitWidth: Kirigami.Units.iconSizes.smallMedium implicitWidth: Kirigami.Units.iconSizes.smallMedium
implicitHeight: 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") Accessible.name: i18n("Muted room")
Layout.rightMargin: Kirigami.Units.smallSpacing Layout.rightMargin: Kirigami.Units.smallSpacing
} }
@@ -122,16 +122,6 @@ Delegates.RoundedItemDelegate {
text: notificationCountLabel.text 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() { function createRoomListContextMenu() {
@@ -139,17 +129,6 @@ Delegates.RoundedItemDelegate {
const menu = component.createObject(root, { const menu = component.createObject(root, {
room: root.currentRoom, 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() menu.open()
} }
} }