Standard way of knowing if window "is wide"

This commit is contained in:
miruka 2019-07-18 01:18:06 -04:00
parent 902ac250b0
commit fa61e8f0e3
6 changed files with 16 additions and 16 deletions

24
TODO.md
View File

@ -1,18 +1,10 @@
- Use `asyncio.as_completed()` instead of `gather`
- Resizing pane sets the autoWidthRatio
- Show sidepane when hovering on the left when collapsed/reduced
- Header back button
- Standardize "wide: width > 414..."
- Way to round avatar corners to allow box radius
- HTextField focus effect
- Devices and client settings in edit account page
- If avatar is set, name color from average color?
- Wrong avatar for group rooms
- Reduce messages ListView cacheBuffer height once http thumbnails
downloading is implemented
- HTextField focus effect
- Button can get "hoverEnabled: false" to let HoverHandlers work
- Handle thumbnail response status 400
- "Loading..." if going to edit account page while it's loading
- Improve avatar tooltips position, add stuff to room tooltips (last msg?)
- Accept drag and dropping a picture in account settings to set avatar
- When all the events loaded on beginning in a room are name/avatar changes,
@ -26,8 +18,10 @@
- Refactoring
- Don't bake in size properties for components
- Unfinished work in button-refactor branch
- Room Sidepane
- Bug fixes
- Wrong avatar for group rooms
- Past events loading (limit 100) freezes the GUI - need to move upsert func
to a WorkerScript
- `MessageDelegate.qml:63: TypeError: 'reloadPreviousItem' not a function`
@ -37,10 +31,15 @@
- "Rejoin" LeftBanner button if room is public
- Daybreak color
- Html links color
- `pyotherside.atexit()`
- Way to put sidepane back to auto-sizing (snap)
- Better look for arrows and option button when sidepane collapsed
- Don't put own messages to the right past certain width
- `pyotherside.atexit()`
- Sidepane
- Header back button when reduced
- Better look for arrows and option button when collapsed
- Way to put it back to auto-sizing (snap)
- Show it when hovering on the left when collapsed/reduced
- Ability to drag on any place of the pane to resize
- Reducable room sidepane, swipe to show full-window
- Invite to room
- Server selection
@ -58,6 +57,7 @@
- Message/text selection
- Custom file picker for Linux...
- Way to round avatar corners to allow box radius
- Major features
- E2E

View File

@ -16,8 +16,6 @@ SwipeView {
property alias headerLabel: innerHeaderLabel
property var hideHeaderUnderHeight: null
property bool wide: width > 414 + leftPadding + rightPadding
property int currentSpacing:
Math.min(theme.spacing * width / 400, theme.spacing * 2)

View File

@ -26,7 +26,7 @@ HPage {
Layout.maximumWidth: Math.min(parent.width, 640)
Layout.preferredWidth:
wide ? parent.width : avatarPreferredSize
window.isWide ? parent.width : avatarPreferredSize
Layout.preferredHeight: childrenRect.height

View File

@ -33,7 +33,7 @@ HGridLayout {
}
columns: 2
flow: wide ? GridLayout.LeftToRight : GridLayout.TopToBottom
flow: window.isWide ? GridLayout.LeftToRight : GridLayout.TopToBottom
rowSpacing: currentSpacing
Component.onCompleted: nameField.field.forceActiveFocus()

View File

@ -8,6 +8,7 @@ QtObject {
property int minimumSupportedWidth: 240
property int minimumSupportedHeight: 120
property int isWideAbove: 599
property int minimumSupportedWidthPlusSpacing: 240 + spacing * 2
property int minimumSupportedHeightPlusSpacing: 120 + spacing * 2

View File

@ -18,6 +18,7 @@ ApplicationWindow {
property bool debug: false
property bool ready: false
property bool isWide: width > theme.isWideAbove
Component.onCompleted: {
Qt.application.organization = "harmonyqml"