deckerst / aves

Aves is a gallery and metadata explorer app, built for Android with Flutter.
BSD 3-Clause "New" or "Revised" License
2.83k stars 106 forks source link

Fix Widget #343

Closed xmha97 closed 2 years ago

xmha97 commented 2 years ago

Please fit the widget in the frame.

Screenshot_2022-09-28-02-46-47-876_com.microsoft.launcher.jpg

deckerst commented 2 years ago

I can't reproduce with a Samsung S10e, but I can with a Samsung S7. I'll take a closer look.

xmha97 commented 2 years ago

I can't reproduce

Use Microsoft Launcher

deckerst commented 2 years ago

I tried the MS launcher with my Samsung S10e, and I see the same padding as you do. But I also see that the widget from Google Photos has the same padding... For the widgets on your screenshots that take the full frame, do they come from MS proprietary apps? Do you know any open-source app that has a full frame widget with the MS launcher?

xmha97 commented 2 years ago

For the widgets on your screenshots that take the full frame, do they come from MS proprietary apps?

No, these are the default widgets of Xiaomi phones

Do you know any open-source app that has a full frame widget with the MS launcher?

Yes, the Persian Calendar app: https://github.com/persian-calendar/persian-calendar

deckerst commented 2 years ago

TLDR; the MS Launcher is broken, they should fix it.

Here's a comparison of the Samsung and MS launchers showing widgets from Google Photos (G), Aves (A) and Persian Calendar (P):

The Persian Calendar highlights something interesting. The widget itself, with its background color, is full frame, but the custom drawing is limited to the widget size reported by the MS Launcher, so its drawing is the same width as the images in the Google Photos or Aves widgets. So background colors, text and other elements that do not depend on the widget size can go full frame, but elements that need to know the widget size (like custom drawing or cropped/scaled images) do not go full frame because the MS Launcher gives the wrong size.

xmha97 commented 2 years ago

I tested your widget in Smart Launcher, there are margins around like Microsoft Launcher! Please test the widget again. @deckerst

Screenshot_2022-11-05-02-32-04-110_ginlemon flowerfree

Screenshot_2022-11-05-02-41-48-774_ginlemon flowerfree

xmha97 commented 2 years ago

Screenshot_2022-11-05-02-46-00-174_ginlemon flowerfree

deckerst commented 2 years ago

Thanks for following up, but my guess is that this launcher also provides the wrong metrics for custom drawing. Please try another app that has a widget with custom drawing (not just a plain color background), like Google Photos, and I bet you'll see the same issue.

xmha97 commented 2 years ago

Google Photos widget is bad on my device, low corners!

It's default Xiaomi launcher:

Screenshot_2022-11-05-03-13-00-739_com miui home

deckerst commented 2 years ago

Tried Smart Launcher. Again, wrong metrics given by the launcher, as i suspected. Screenshot_20221105_075644_Smart Launcher