mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
desktop: cache photo and geo icons
The icons shown in the dive list were rendered for every single access. Render them only once. This supposes that the defaultIconMetrics structure does not change once the icons are rendered! Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
41df39fdbe
commit
b3e4c9c8da
3 changed files with 31 additions and 11 deletions
|
@ -43,7 +43,7 @@ static int defaultIconSize(int height)
|
|||
return ret;
|
||||
}
|
||||
|
||||
const IconMetrics & defaultIconMetrics()
|
||||
const IconMetrics &defaultIconMetrics()
|
||||
{
|
||||
if (dfltIconMetrics.sz_small == -1) {
|
||||
int small = defaultIconSize(defaultModelFontMetrics().height());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue