TBog / TBLauncher

based on https://github.com/Neamar/KISS
GNU General Public License v3.0
140 stars 18 forks source link

Widgets on screen position #412

Open TBog opened 1 year ago

TBog commented 1 year ago

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

TBog commented 1 year ago

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

ltguillaume commented 1 year ago

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

TBog commented 1 year ago

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

ltguillaume commented 1 year ago

Ah that makes sense

syphyr commented 7 months ago

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

TBog commented 6 months ago

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.