HBox: make buttons a column if not enough width
This commit is contained in:
parent
a3b56519f7
commit
38781502c6
4
TODO.md
4
TODO.md
|
@ -1,4 +1,6 @@
|
|||
- Refactoring
|
||||
- Room header elide detection
|
||||
- Use HBox for Profile
|
||||
- Banners
|
||||
- Composer
|
||||
|
||||
|
@ -94,7 +96,6 @@
|
|||
- Server selection
|
||||
- Register/Forgot? for SignIn dialog
|
||||
- Add room
|
||||
- Logout & leave/forget room warning popup
|
||||
- Prevent using the composer if no permission (power levels)
|
||||
- Prevent using an alias if that user is not in the room or no permission
|
||||
- Spinner when loading past room events or images
|
||||
|
@ -132,6 +133,7 @@
|
|||
- Opening links with keyboard
|
||||
|
||||
- Client improvements
|
||||
- More error details
|
||||
- Refetch profile after manual profile change, don't wait for a room event
|
||||
- Prevent starting multiple instances, causes problems with E2E DB
|
||||
(sending new messages from second instances makes them undecryptable to
|
||||
|
|
|
@ -70,10 +70,13 @@ Rectangle {
|
|||
Layout.rightMargin: interfaceBox.horizontalSpacing
|
||||
}
|
||||
|
||||
HRowLayout {
|
||||
HGridLayout {
|
||||
id: buttonGrid
|
||||
visible: buttonModel.length > 0
|
||||
flow: width >= buttonRepeater.childrenImplicitWidth ?
|
||||
GridLayout.LeftToRight : GridLayout.TopToBottom
|
||||
|
||||
Repeater {
|
||||
HRepeater {
|
||||
id: buttonRepeater
|
||||
model: []
|
||||
|
||||
|
|
17
src/qml/Base/HRepeater.qml
Normal file
17
src/qml/Base/HRepeater.qml
Normal file
|
@ -0,0 +1,17 @@
|
|||
import QtQuick.Controls 2.12
|
||||
import QtQuick 2.12
|
||||
|
||||
|
||||
Repeater {
|
||||
id: repeater
|
||||
|
||||
readonly property int childrenImplicitWidth: {
|
||||
let total = 0
|
||||
|
||||
for (let i = 0; i < repeater.count; i++) {
|
||||
total += repeater.itemAt(i).implicitWidth
|
||||
}
|
||||
|
||||
return total
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user