Commit Graph

173 Commits

Author SHA1 Message Date
miruka
fea1a8df4c Remove overshoot from panes auto-expand animation
Caused pane to bounce every time their focus field were focused, even
when they were already at sufficiant size
2020-07-14 04:30:01 -04:00
miruka
f84b13c657 Move autoexpand from MultiViewPane to base HDrawer 2020-07-14 03:19:57 -04:00
miruka
c018c04cab Auto-expand room pane to show settings/profiles
If the room pane is below the default width (by user resizing or because
of narrow window), go to the room settings or a member profile will
automatically expand it as needed.

The pane goes back to its previous size once the settings/profile is
left.

If the window is narrow enough that expanding the pane normally would
reduce the timeline's width past its minimum, the pane is shown as an
overlay instead.
2020-07-14 03:00:10 -04:00
miruka
7277b5d198 PowerLevelControl: add error and warning texts 2020-07-13 19:21:50 -04:00
miruka
757679a6e0 Make power level control permission-aware 2020-07-13 18:57:42 -04:00
miruka
0459657575 Room default power level awareness 2020-07-13 18:54:30 -04:00
miruka
6ff3cc5f39 Add buttons to Save/cancel power level changes 2020-07-13 18:54:28 -04:00
miruka
1adfa9f4a2 PowerLevelControl: fix default/reset system 2020-07-12 18:48:07 -04:00
miruka
cc831d0640 Move cursorShape property out of HListView
The Timeline EventList is the only HListView that uses it. For other
list views, it interferes with items like text fields which need to set
cursor shape by themselves.
2020-07-12 16:59:33 -04:00
miruka
fe831e7865 Add power level display to member profile 2020-07-12 16:14:24 -04:00
miruka
e3b6f3eb54 HButton: add "uncheckable" property 2020-07-12 15:48:28 -04:00
miruka
370418bcf5 AutoDirectionLayout: consider columnSpacing
For summedImplicitWidth calculation.
2020-07-12 13:10:19 -04:00
miruka
3c7b78d4ca Reorder QML files to follow coding conventions
https://doc.qt.io/qt-5/qml-codingconventions.html#qml-object-declarations
2020-07-12 01:27:44 -04:00
miruka
229fbee298 Remove HRichLabel component
Sparsly used and inflexible, just use HLabel
2020-07-12 00:13:52 -04:00
miruka
02982f9dc3 Remove unused HAccordionView.qml 2020-07-12 00:13:52 -04:00
miruka
ed030f7dd9 Refactor ButtonLayout module components
- Rename ButtonLayout module to just Buttons

- Rename ButtonLayout into AutoDirectionLayout and move it to Base,
  it's useful not just for buttons

- Rename OtherButton into GroupButton, which is now the base of all
  other Buttons buttons

- Add generic (Positive|Middle|Negative)Button components, which are now
  the base for (Apply|Cancel)Button
2020-07-12 00:13:52 -04:00
miruka
1ad3de3917 Make ButtonLayout faster and more precise 2020-07-11 22:06:37 -04:00
miruka
58e7321941 Fix HButton height for icon-only buttons
The button only considered its label previously to calculate its
implicit height.
2020-07-11 18:44:57 -04:00
miruka
c9843bb2ff HTextArea: prevent leaking left/right if readOnly 2020-07-11 16:10:21 -04:00
miruka
8557c79e12 Improve z-ordering of account avatar elements
Show presence orb in front of unread messages, which are shown in front
of the loading spinner overlays
2020-07-10 14:08:16 -04:00
miruka
a7702a5260 Add borderWidth presence theme property 2020-07-10 13:38:18 -04:00
vslg
5abdc1f779 Fix changes requested (#101)
- Fix code formatting issues.
- Document `Presence`.
- Improve `Presence.__lt__()` performance by
  defining a dict outside the method.
- Make presence ball radius relative to uiScale
  and configurable from theme.
2020-07-10 13:14:18 -04:00
vslg
43df8fd60b Bug fix and minor improvements
Improvements:
- Add instant feedback upon setting a different
  presence for account (local echo)
- Sort room members by power level and then
  presence
- Periodically update members' `last_acitve_at`
  field on the room pane
- Move status message field up on account context
  menu, and put invisible before offline again

Bug fix:
- Do not try to override presence set from
  another client, accept it
2020-07-10 13:14:18 -04:00
vslg
a3c9ac20c6 Make offline presence to stop sync
Setting the presence of an account to offline
will make the client to end sync task and will
prevent messages from being sent.

Setting it to online again or any other presence
will start sync task again.

Left:
- Local echo to presence change
- UI Control to affect all members presence
- Block more requests to be sent (e.g. member
  actions)
2020-07-10 13:14:18 -04:00
vslg
6e202c3e27 Fix outdated presence for lazy loaded members 2020-07-10 13:14:18 -04:00
vslg
59198da3b0 Add presence theme options 2020-07-10 13:14:18 -04:00
vslg
215557e353 Add presence circle on members avatar and account 2020-07-10 13:14:18 -04:00
miruka
e91a1f93e0 Fix errors related to button.loading 2020-07-10 13:14:18 -04:00
miruka
2cf7b91829 Don't try to highlight first item on menu open()
It's imprevisible where the menu is gonna open and this which item is
gonna be under the mouse cursor. Also to match the behavior of other
programs.
2020-07-10 13:14:18 -04:00
miruka
e2bc0cbd84 Improve context menu cursor workaround
- Close menu instead of clicking item, to match behavior of other
  programs

- Now work on all edges of the menu, not just top
2020-07-10 13:14:18 -04:00
miruka
d4a0434bd9 Disable "Select all" when no text in field/area 2020-07-10 13:14:18 -04:00
miruka
612ded755a Add context menu for text fields and areas 2020-07-10 13:14:18 -04:00
miruka
657b700fcd Context menu initial cursor position workaround
Workaround for this: when opening a context menu at cursor position,
cursor will be in the menu's border instead of first menu item,
forcing the user to move the mouse for the click to do anything.
2020-07-10 13:14:18 -04:00
miruka
9612470c9c Highlight first item when opening context menu 2020-07-10 13:14:18 -04:00
miruka
10eeb662af HTile: handle menu key press, open context menu 2020-07-10 13:14:17 -04:00
miruka
c35894e4c8 HTile: trigger leftClicked() on enter/return/space
This makes it possible to activate any tab-focused HTile with the
keyboard.
2020-07-10 13:14:17 -04:00
miruka
b6500add68 Remove useless imports in HAvatar and HNoticePage 2020-07-10 13:14:17 -04:00
miruka
9edfba8f18 Fix hovering media not changing mouse cursor shape 2020-07-10 13:14:17 -04:00
miruka
dbfe04458c Set HStackView transitions that make sense 2020-07-10 13:14:17 -04:00
miruka
9b43bef935 Add profile/verification UI for room members 2020-07-10 13:14:17 -04:00
miruka
2674702a59 Fix field/area left/right press with selected text
Fix bug in HTextField & HTextArea: when all text was selected, pressing
left or right arrow keys to go to the beginning or end and deselect
didn't respond.
2020-07-10 13:14:17 -04:00
miruka
24e657d193 Protect field/area text binding if no default text 2020-07-10 13:14:17 -04:00
miruka
3933615f67 Fix menu/popup destruction disabling keybinds 2020-07-10 13:14:17 -04:00
miruka
90a7a3a6cf Add kineticScrollingMaxSpeed setting 2020-07-10 13:14:17 -04:00
miruka
2d410bb7cc Themes: rename section scrollbar → scrollBar 2020-06-26 08:21:24 -04:00
miruka
604daed5fe Increase button focusline height to avoid problems 2020-06-26 06:56:29 -04:00
miruka
980e258df8 Always parent popups to window 2020-06-26 06:41:15 -04:00
miruka
d058926902 Uncheck messages before clearing event list 2020-06-26 06:11:03 -04:00
miruka
d40852a11c HListView: add checkedIndice property 2020-06-26 03:47:55 -04:00
miruka
78c04e6404 Fix flickable pages keyboard scrolling 2020-06-26 03:16:36 -04:00