Fix expand icon size and startup highlight
Remove "hide hover highlight when keyboard pressed" feature, too hacky.
This commit is contained in:
@@ -7,10 +7,6 @@ HListView {
|
||||
id: accountRoomList
|
||||
|
||||
|
||||
signal hideHoverHighlight()
|
||||
onHideHoverHighlight: hoverBlocker.enabled = true
|
||||
|
||||
|
||||
readonly property var originSource: window.sidePaneModelSource
|
||||
readonly property var collapseAccounts: window.uiState.collapseAccounts
|
||||
readonly property string filter: paneToolBar.roomFilter
|
||||
@@ -62,14 +58,12 @@ HListView {
|
||||
}
|
||||
|
||||
function previous(activate=true) {
|
||||
hideHoverHighlight()
|
||||
decrementCurrentIndex()
|
||||
if (activate) activateLimiter.requestFire()
|
||||
|
||||
}
|
||||
|
||||
function next(activate=true) {
|
||||
hideHoverHighlight()
|
||||
incrementCurrentIndex()
|
||||
if (activate) activateLimiter.requestFire()
|
||||
}
|
||||
@@ -106,22 +100,14 @@ HListView {
|
||||
|
||||
delegate: Loader {
|
||||
width: accountRoomList.width
|
||||
source: "Delegate" +
|
||||
(model.type == "Account" ? "Account.qml" : "Room.qml")
|
||||
Component.onCompleted: setSource(
|
||||
model.type == "Account" ?
|
||||
"DelegateAccount.qml" : "DelegateRoom.qml",
|
||||
{view: accountRoomList}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: hoverBlocker
|
||||
anchors.fill: parent
|
||||
enabled: false
|
||||
hoverEnabled: enabled
|
||||
propagateComposedEvents: true
|
||||
|
||||
onMouseXChanged: enabled = false
|
||||
onMouseYChanged: enabled = false
|
||||
}
|
||||
|
||||
HRateLimiter {
|
||||
id: filterLimiter
|
||||
cooldown: 16
|
||||
|
||||
@@ -8,12 +8,12 @@ HTileDelegate {
|
||||
topPadding: model.index > 0 ? sidePane.currentSpacing / 2 : 0
|
||||
bottomPadding: topPadding
|
||||
backgroundColor: theme.sidePane.account.background
|
||||
|
||||
opacity: collapsed && ! forceExpand ?
|
||||
theme.sidePane.account.collapsedOpacity : 1
|
||||
|
||||
isCurrent: window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
|
||||
window.uiState.pageProperties.userId == model.data.user_id
|
||||
shouldBeCurrent:
|
||||
window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
|
||||
window.uiState.pageProperties.userId == model.data.user_id
|
||||
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
@@ -52,9 +52,8 @@ HTileDelegate {
|
||||
HButton {
|
||||
id: expand
|
||||
iconName: "expand"
|
||||
ico.dimension: 16
|
||||
backgroundColor: "transparent"
|
||||
leftPadding: sidePane.currentSpacing / 1.5
|
||||
padding: sidePane.currentSpacing / 1.5
|
||||
rightPadding: leftPadding
|
||||
onClicked: accountDelegate.toggleCollapse()
|
||||
|
||||
@@ -70,7 +69,5 @@ HTileDelegate {
|
||||
}
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,9 +8,11 @@ HTileDelegate {
|
||||
spacing: sidePane.currentSpacing
|
||||
backgroundColor: theme.sidePane.room.background
|
||||
opacity: model.data.left ? theme.sidePane.room.leftRoomOpacity : 1
|
||||
isCurrent: window.uiState.page == "Chat/Chat.qml" &&
|
||||
window.uiState.pageProperties.userId == model.user_id &&
|
||||
window.uiState.pageProperties.roomId == model.data.room_id
|
||||
|
||||
shouldBeCurrent:
|
||||
window.uiState.page == "Chat/Chat.qml" &&
|
||||
window.uiState.pageProperties.userId == model.user_id &&
|
||||
window.uiState.pageProperties.roomId == model.data.room_id
|
||||
|
||||
|
||||
Behavior on opacity { HNumberAnimation {} }
|
||||
|
||||
Reference in New Issue
Block a user