Fix expand icon size and startup highlight
Remove "hide hover highlight when keyboard pressed" feature, too hacky.
This commit is contained in:
parent
1f5b46c257
commit
8ef3a6dc33
3
TODO.md
3
TODO.md
|
@ -1,5 +1,4 @@
|
||||||
- Refactoring
|
- Refactoring
|
||||||
- Repair timer/connection
|
|
||||||
- Repair filter members field and retest its performance
|
- Repair filter members field and retest its performance
|
||||||
|
|
||||||
- Use HInterfaceBox for EditAccount Profile and Encryption
|
- Use HInterfaceBox for EditAccount Profile and Encryption
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
- Fixes
|
- Fixes
|
||||||
- (Left?)Banner binding loop
|
- (Left?)Banner binding loop
|
||||||
- Reloading config files (cache)
|
- Reloading config files (cache)
|
||||||
- Tiny invisible scrollbar
|
|
||||||
- Run import in thread and AsyncClient.olm functions, they block async loop
|
- Run import in thread and AsyncClient.olm functions, they block async loop
|
||||||
- Handle import keys errors
|
- Handle import keys errors
|
||||||
|
|
||||||
|
@ -34,6 +32,7 @@
|
||||||
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
||||||
|
|
||||||
- UI
|
- UI
|
||||||
|
- Make HListView scrollbars visible
|
||||||
- Remove first html lists left margin
|
- Remove first html lists left margin
|
||||||
|
|
||||||
- Popup:
|
- Popup:
|
||||||
|
|
|
@ -1 +1,52 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z"/></svg>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="24"
|
||||||
|
height="24"
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
version="1.1"
|
||||||
|
id="svg4"
|
||||||
|
sodipodi:docname="expand.svg"
|
||||||
|
inkscape:version="">
|
||||||
|
<metadata
|
||||||
|
id="metadata10">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<defs
|
||||||
|
id="defs8" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="640"
|
||||||
|
inkscape:window-height="480"
|
||||||
|
id="namedview6"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="9.8333333"
|
||||||
|
inkscape:cx="12"
|
||||||
|
inkscape:cy="12"
|
||||||
|
inkscape:current-layer="svg4" />
|
||||||
|
<path
|
||||||
|
d="M 6.4237288,4.7084746 8.9004169,2.2779661 18.576271,12 8.9004169,21.722034 6.4237288,19.291525 13.715254,12 Z"
|
||||||
|
id="path2"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
style="stroke-width:0.81016952" />
|
||||||
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 1.5 KiB |
|
@ -1,13 +1,54 @@
|
||||||
<?xml version="1.0" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
|
||||||
<!-- Created using Krita: http://krita.org -->
|
<!-- Created using Krita: http://krita.org -->
|
||||||
<svg xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
<svg
|
||||||
xmlns:krita="http://krita.org/namespaces/svg/krita"
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
width="18pt"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
height="18pt"
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
viewBox="0 0 18 18">
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
<defs/>
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
<path id="shape0" transform="matrix(0.75 0 0 0.75 3.75 0)" fill="#c8c8c8" d="M0 3L3.057 0L15 12L3.057 24L0 21L9 12Z"/>
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="18pt"
|
||||||
|
height="18pt"
|
||||||
|
viewBox="0 0 18 18"
|
||||||
|
version="1.1"
|
||||||
|
id="svg15"
|
||||||
|
sodipodi:docname="expand.svg"
|
||||||
|
inkscape:version="">
|
||||||
|
<metadata
|
||||||
|
id="metadata19">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="640"
|
||||||
|
inkscape:window-height="480"
|
||||||
|
id="namedview17"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="9.8333333"
|
||||||
|
inkscape:cx="-7.6779661"
|
||||||
|
inkscape:cy="12"
|
||||||
|
inkscape:current-layer="svg15" />
|
||||||
|
<defs
|
||||||
|
id="defs12" />
|
||||||
|
<path
|
||||||
|
id="shape0"
|
||||||
|
d="M 4.8940678,3.6228814 6.7204958,1.8305085 13.855932,9 6.7204958,16.169492 4.8940678,14.377119 10.271186,9 Z"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
style="fill:#c8c8c8;stroke-width:0.59745765" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|
Before Width: | Height: | Size: 607 B After Width: | Height: | Size: 1.6 KiB |
|
@ -55,6 +55,7 @@ Button {
|
||||||
svgName: loading ? "hourglass" : iconName
|
svgName: loading ? "hourglass" : iconName
|
||||||
|
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
|
|
|
@ -6,10 +6,10 @@ HButton {
|
||||||
|
|
||||||
|
|
||||||
signal activated()
|
signal activated()
|
||||||
signal highlightMe()
|
|
||||||
|
|
||||||
|
|
||||||
property bool isCurrent: false
|
property HListView view: ListView.view
|
||||||
|
property bool shouldBeCurrent: false
|
||||||
|
|
||||||
readonly property var delegateModel: model
|
readonly property var delegateModel: model
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ HButton {
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
id: title
|
id: title
|
||||||
text: "Title"
|
text: "Missing title"
|
||||||
elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
verticalAlignment: Qt.AlignVCenter
|
verticalAlignment: Qt.AlignVCenter
|
||||||
|
|
||||||
|
@ -73,29 +73,22 @@ HButton {
|
||||||
children: [image, details].concat(additionalItems)
|
children: [image, details].concat(additionalItems)
|
||||||
}
|
}
|
||||||
|
|
||||||
onIsCurrentChanged: if (isCurrent) highlightMe()
|
onActivated: view.currentIndex = model.index
|
||||||
onHighlightMe: accountRoomList.currentIndex = model.index
|
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
ListView.highlightRangeMode = ListView.NoHighlightRange
|
view.highlightRangeMode = ListView.NoHighlightRange
|
||||||
ListView.highlightMoveDuration = 0
|
view.highlightMoveDuration = 0
|
||||||
activated()
|
activated()
|
||||||
ListView.highlightRangeMode = ListView.ApplyRange
|
view.highlightRangeMode = ListView.ApplyRange
|
||||||
ListView.highlightMoveDuration = theme.animationDuration
|
view.highlightMoveDuration = theme.animationDuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
interval: 100
|
interval: 100
|
||||||
repeat: true
|
repeat: true
|
||||||
running: ListView.currentIndex == -1
|
running: view.currentIndex == -1
|
||||||
// Component.onCompleted won't work for this
|
// Component.onCompleted won't work for this
|
||||||
onTriggered: if (isCurrent) highlightMe()
|
onTriggered: if (shouldBeCurrent) view.currentIndex = model.index
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connections {
|
|
||||||
// target: ListView
|
|
||||||
// onHideHoverHighlight: tile.hovered = false
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,10 +7,6 @@ HListView {
|
||||||
id: accountRoomList
|
id: accountRoomList
|
||||||
|
|
||||||
|
|
||||||
signal hideHoverHighlight()
|
|
||||||
onHideHoverHighlight: hoverBlocker.enabled = true
|
|
||||||
|
|
||||||
|
|
||||||
readonly property var originSource: window.sidePaneModelSource
|
readonly property var originSource: window.sidePaneModelSource
|
||||||
readonly property var collapseAccounts: window.uiState.collapseAccounts
|
readonly property var collapseAccounts: window.uiState.collapseAccounts
|
||||||
readonly property string filter: paneToolBar.roomFilter
|
readonly property string filter: paneToolBar.roomFilter
|
||||||
|
@ -62,14 +58,12 @@ HListView {
|
||||||
}
|
}
|
||||||
|
|
||||||
function previous(activate=true) {
|
function previous(activate=true) {
|
||||||
hideHoverHighlight()
|
|
||||||
decrementCurrentIndex()
|
decrementCurrentIndex()
|
||||||
if (activate) activateLimiter.requestFire()
|
if (activate) activateLimiter.requestFire()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function next(activate=true) {
|
function next(activate=true) {
|
||||||
hideHoverHighlight()
|
|
||||||
incrementCurrentIndex()
|
incrementCurrentIndex()
|
||||||
if (activate) activateLimiter.requestFire()
|
if (activate) activateLimiter.requestFire()
|
||||||
}
|
}
|
||||||
|
@ -106,22 +100,14 @@ HListView {
|
||||||
|
|
||||||
delegate: Loader {
|
delegate: Loader {
|
||||||
width: accountRoomList.width
|
width: accountRoomList.width
|
||||||
source: "Delegate" +
|
Component.onCompleted: setSource(
|
||||||
(model.type == "Account" ? "Account.qml" : "Room.qml")
|
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 {
|
HRateLimiter {
|
||||||
id: filterLimiter
|
id: filterLimiter
|
||||||
cooldown: 16
|
cooldown: 16
|
||||||
|
|
|
@ -8,12 +8,12 @@ HTileDelegate {
|
||||||
topPadding: model.index > 0 ? sidePane.currentSpacing / 2 : 0
|
topPadding: model.index > 0 ? sidePane.currentSpacing / 2 : 0
|
||||||
bottomPadding: topPadding
|
bottomPadding: topPadding
|
||||||
backgroundColor: theme.sidePane.account.background
|
backgroundColor: theme.sidePane.account.background
|
||||||
|
|
||||||
opacity: collapsed && ! forceExpand ?
|
opacity: collapsed && ! forceExpand ?
|
||||||
theme.sidePane.account.collapsedOpacity : 1
|
theme.sidePane.account.collapsedOpacity : 1
|
||||||
|
|
||||||
isCurrent: window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
|
shouldBeCurrent:
|
||||||
window.uiState.pageProperties.userId == model.data.user_id
|
window.uiState.page == "Pages/EditAccount/EditAccount.qml" &&
|
||||||
|
window.uiState.pageProperties.userId == model.data.user_id
|
||||||
|
|
||||||
|
|
||||||
Behavior on opacity { HNumberAnimation {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
|
@ -52,9 +52,8 @@ HTileDelegate {
|
||||||
HButton {
|
HButton {
|
||||||
id: expand
|
id: expand
|
||||||
iconName: "expand"
|
iconName: "expand"
|
||||||
ico.dimension: 16
|
|
||||||
backgroundColor: "transparent"
|
backgroundColor: "transparent"
|
||||||
leftPadding: sidePane.currentSpacing / 1.5
|
padding: sidePane.currentSpacing / 1.5
|
||||||
rightPadding: leftPadding
|
rightPadding: leftPadding
|
||||||
onClicked: accountDelegate.toggleCollapse()
|
onClicked: accountDelegate.toggleCollapse()
|
||||||
|
|
||||||
|
@ -70,7 +69,5 @@ HTileDelegate {
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on opacity { HNumberAnimation {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
|
|
||||||
Layout.fillHeight: true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,11 @@ HTileDelegate {
|
||||||
spacing: sidePane.currentSpacing
|
spacing: sidePane.currentSpacing
|
||||||
backgroundColor: theme.sidePane.room.background
|
backgroundColor: theme.sidePane.room.background
|
||||||
opacity: model.data.left ? theme.sidePane.room.leftRoomOpacity : 1
|
opacity: model.data.left ? theme.sidePane.room.leftRoomOpacity : 1
|
||||||
isCurrent: window.uiState.page == "Chat/Chat.qml" &&
|
|
||||||
window.uiState.pageProperties.userId == model.user_id &&
|
shouldBeCurrent:
|
||||||
window.uiState.pageProperties.roomId == model.data.room_id
|
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 {} }
|
Behavior on opacity { HNumberAnimation {} }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user