TBLauncher icon indicating copy to clipboard operation
TBLauncher copied to clipboard

Widgets on screen position

Open TBog opened this issue 2 years ago • 6 comments

Description

When changing the screen resolution the widgets zoom in or out.

Context

Honor phone lets the user change display resolution

Steps to Reproduce

To reproduce the behavior:

  1. Add widget while phone has High (2848×1312) screen resolution
  2. Change screen resolution from "Display & brightness" to Low (2136×984)
  3. Go back to widgets
  4. See widgets enlarged and off-screen

Expected behavior

Widgets do not change position or size

Device info

  • Device: HONOR Magic5 Pro
  • MagicOS version 7.1
  • Android version 13
  • TinyBit Launcher version: v7.4

TBog avatar Sep 22 '23 07:09 TBog

I'm thinking of changing the stored size and position from pixels to a percentage.

TBog avatar Sep 22 '23 07:09 TBog

In order to not compromise on precision, I'd say use percentages like 99.999% and you're good.

ltguillaume avatar Sep 22 '23 16:09 ltguillaume

I'm thinking that I can compute the position if I also save the screen size with the widget size and position.

TBog avatar Sep 23 '23 08:09 TBog

Ah that makes sense

ltguillaume avatar Sep 23 '23 22:09 ltguillaume

I can't figure out how to make the widget stay centered when switching from portrait to landscape.

syphyr avatar Apr 24 '24 15:04 syphyr

Yes, currently the widget position is stored as an absolute position. We should be able to either set different position and size for portrait and landscape or find a way to automagically compute good ones when we switch.

TBog avatar Apr 28 '24 07:04 TBog