Skip to content
Snippets Groups Projects

Scale down oversized views

Merged Sebastian Krzyszkowiak requested to merge sebastian.krzyszkowiak/phoc:scaling into master
3 unresolved threads

Merge request reports

Pipeline #56591 passed

Pipeline passed for 77f46597 on sebastian.krzyszkowiak:scaling

Test coverage 39.50% (0.10%) from 1 job

Merged by Guido GuntherGuido Gunther 4 years ago (Jun 25, 2020 7:27am UTC)

Loading

Pipeline #56605 passed

Pipeline passed for 77f46597 on master

Test coverage 39.50% (0.10%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Guido Gunther
  • works as advertisedhere so happy to merge after the above is fixed.

  • added 4 commits

    • 6116ad64 - 1 commit from branch Librem5:master
    • 60cf1d81 - Scale down oversized views
    • 4b36361d - Make auto-scaling configurable per application
    • 31ae3e0a - phoc.ini.example: Drop outdated entries

    Compare with previous version

  • added 2 commits

    • 708a0c53 - Make auto-scaling configurable per application
    • 77f46597 - phoc.ini.example: Drop outdated entries

    Compare with previous version

  • Guido Gunther
    Guido Gunther @guido.gunther started a thread on commit 708a0c53
  • 694 PhocServer *server = phoc_server_get_default ();
    695
    676 696 if (!view->impl->want_scaling(view)) {
    677 697 return;
    678 698 }
    679 699
    700 bool scaling_enabled = false;
    701
    702 if (view->app_id) {
    703 g_autofree gchar *munged_app_id = munge_app_id (view->app_id);
    704 g_autofree gchar *path = g_strconcat ("/sm/puri/phoc/application/", munged_app_id, "/", NULL);
    705 g_autoptr (GSettings) setting = g_settings_new_with_path ("sm.puri.phoc.application", path);
    706 scaling_enabled = g_settings_get_boolean (setting, "scale-to-fit");
    707 }
    708
    709 if (!scaling_enabled && !phoc_desktop_get_scale_to_fit (server->desktop)) {
    • we can move the phoc_desktop_get_scale_to_fit check upwards to avoid the whole per app lookup if it's off globally:

      if (!view->impl->want_scaling(view) | !view->impl->want_scaling(view)) { ...

      but that can happen as a follow up.

    • Please register or sign in to reply
  • thanks for adding the other helper the docs too! We don't document the global scale-to-fit toggle yet but lets merge that in now and go from there.

  • merged

  • @guido.gunther Is there a reason why global scale-to-fit is set to false in phoc? I set it to true on my Pinephone running Mobian (gsettings set sm.puri.phoc scale-to-fit true) and many things now fit the screen much better, particularly pop-ups like notifications or menu pages for various apps. Is there a reason why it would be better to set it on a per-app basis (which doesn't always work with pop-ups)? I haven't found any problems yet. Thanks for your thoughts.

    Edited by Mark Daniels
  • @DarkManiels Two reasons:

    • one is that we want proper adaptive apps that actually fit. If scaling is enabled by default, we'll likely get plenty of apps that almost fit and nobody will bother to make them actually fit because scaling will make them good enough. Scaling should be used just as a workaround for legacy apps that won't get fixed anytime soon.
    • second one is #141 - there are some edge cases that make scaling logic go insane sometimes.

    Do you have any examples of popups or menus that don't work with per-app scaling but do with global one?

  • BTW. I'm even considering completely removing global scaling option once phosh#334 gets implemented, since enabling it per app when needed will be then very easy and convenient. But of course if per-app mode misses some popups and menus it should be fixed first.

  • Thank you for the prompt reply, Sebastian. I understand your logic, and would definitely like to see more proper adaptive apps. But of course we're not there yet, and for now the global option is very helpful for me at least, so I hope you don't remove it.

    I can think of three examples where per-app scale-to-fit doesn't work.

    • One is with the music player app QuodLibet. When you open the settings menu it comes up as a pop-up, and is a bit wider than the screen, so you can't see everything on the menu. When you enable scale-to-fit for the app, this doesn't seem to affect the settings pop-up.
    • Another is with calendar notifications from Evolution. If you have more than one you should be able to either dismiss them one-by-one or click the "Dismiss all" button. But without setting the global option to true you can't even see the "Dismiss all" button, so the only way to dismiss them is one-by-one. Setting scale-to-fit for Evolution doesn't seem to have any effect on the notifications.
    • Gnome Calendar also fits better for me since I set the global setting to true. Before that it would load up all of my events, fitting nicely on the screen, but once it was done loading events it would re-size slightly larger and I would lose one day of the week off the edge of the screen. This is now fixed with the global setting on.
  • Thanks. This would mean that there's a bug somewhere, I'll take a look at it.

    I will remove the global option only after making sure that it's been made redundant by other improvements ;)

    • Thank you - I appreciate it all your work on this project. I do have a Librem 5 on order as well, and am looking forward to receiving it with the Evergreen batch!

    • @DarkManiels if apps don't fit the screen it's worthwhile to file that upstream since upstream might not even be aware.

      Edited by Guido Gunther
    • Thank you, Guido. I will do that. For now I'm still keeping the global scale-to-fit on because too many apps I like don't work when I turn it off. But I do turn it off now and then to see what still has problems, and will report to those projects and ask them to work on their scaling for phone screens.

    • Please register or sign in to reply
  • Please register or sign in to reply
    Loading