oxide icon indicating copy to clipboard operation
oxide copied to clipboard

FOUC when Oxide starts

Open X-Ryl669 opened this issue 2 years ago • 1 comments

Describe the bug This is just an annoyance more than a bug. When oxide starts up, it displays the icons of applications in a X column style and then refresh with a Y column style so the icon are redrawn at another place and another size. Also, the odd number of columns have disappeared in recent version, and odd number is usually nicer than even number (so you have a even-number of space between the icons).

This also happens when clicking on an icon, for example, when swiping up from Xochitl, when it displays the application list on the bottom bar, the icons are slightly shifted and then redrawn when clicked, or on the launcher. The icon shouldn't move when clicked. A "visual" drag event should only happens after some magnetic move threshold is forced, not as soon as clicked.

To Reproduce Steps to reproduce the behavior:

  1. Launch oxide from tarnish.
  2. Input pin
  3. Flash of unstyled content for the icons that will refresh with a different place than expected
  4. See error

Expected behavior Ideally, oxide should differ drawing until it has read its configuration and laid out the position and size of all icons. When clicking a icon, the "start drag" UI feedback should be disabled. This can probably be fixed by setting up a threshold for registering a drag event (like 100px or the column's half size). Only when a move/drag overcome this threshold should the drag start to be displayed.

Version Information:

  • Device: [e.g. reMarkable 2]
  • OS: [3.1]
  • Version [2.6-r1.8]

X-Ryl669 avatar Apr 24 '23 17:04 X-Ryl669

Only even column counts have been around for 3 years.

The redraw on launch happens because it draws the screen before loading in the configuration, as you've surmised. Parsing the config file before loading the display is possible, but would require more guards in the code, or a different code path to avoid crashes due to how the UI is updated. I'd be open to a PR that fixes this. https://github.com/Eeems-Org/oxide/blob/80eb5373ba0d21d284315890e8786ea27973948a/applications/launcher/controller.h#L209-L221

The redraw when clicked is an intentional animation to show that it's been clicked. This is to make it more obvious that something is happening if you long press on it. It is not a drag event. If you are somehow able to trigger dragging on either the launcher or the task switcher, that is not expected.

https://github.com/Eeems-Org/oxide/blob/master/applications/launcher/widgets/AppItem.qml#L64-L79 https://github.com/Eeems-Org/oxide/blob/master/applications/task-switcher/widgets/AppItem.qml#L60-L75

Eeems avatar Apr 24 '23 17:04 Eeems