Feature #957


Pre-scale icons so they don't need to be re-scaled each time they are displayed.

Added by Hammel about 1 year ago. Updated almost 1 year ago.

Start date:
11 Nov 2021
Due date:
11 Nov 2021
% Done:


Estimated time:
01 - Critical


The icons won't change size after the launcher starts. So it seems helpful to pre-scale them once we know the canvas size.

The easiest way to do this is to simply scale them the first time they are displayed and save the updated image. The scaling is already being done. All that's needed to is to pass in the app_entry to do_drawing, and let the latter chose which icons to use, scaling them if not previously scaled.

A boolean is needed to know if the image has been scaled previously. It should be set to false when the image file is loaded and set to true after the icon has been scaled the first time.

The selected image (icon or splash image) depends on the platform id. Zero's and B's use the icon (it's smaller and scaling will be less taxing) while the 2's and 3's will use the splash image (since they have multiple cores and more memory).

Related issues

Related to launcher - Bug #940: Colored icons are missing.ClosedHammel26 Feb 2023

Follows launcher - Bug #872: Icons should be preloaded and prescaledClosedHammel10 Nov 2021

Actions #1

Updated by Hammel about 1 year ago

  • Related to Bug #940: Colored icons are missing. added
Actions #2

Updated by Hammel about 1 year ago

  • Due date set to 11 Nov 2021
  • Start date changed from 15 Apr 2023 to 11 Nov 2021
  • Follows Bug #872: Icons should be preloaded and prescaled added
Actions #3

Updated by Hammel about 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

RM #872 was supposed to include pre-scaling of icons. However, it only handled pre-loading of icons, along with some work with using colored icons which will be re-implemented via RM #940.

Actions #4

Updated by Hammel about 1 year ago

  • % Done changed from 10 to 20

There is a lot of work to do here because there was lots of duplicate code used for scaling. The do_drawing routine also needs to select the image to use, not the callers which should be much simpler than they are.

Because this is a big change to improve performance and use colored icons where appropriate, the commits for this will need careful testing.

Actions #5

Updated by Hammel about 1 year ago

First pass at these changes are ready for testing. Need to try them on an RPi 3 first, which should display colored icons with these updates.

Actions #6

Updated by Hammel almost 1 year ago

  • Status changed from In Progress to Closed
  • % Done changed from 20 to 100

RPi 2 and 3 are working quite well, with colored icons.

RPi 1 displays the Media Player correct with the updates.

Code is committed and pushed.

Closing issue.


Also available in: Atom PDF