lp:~larsu/ubuntu-ui-toolkit/custom-icon-lookup

Created by Lars Karlitski and last modified
Get this branch:
bzr branch lp:~larsu/ubuntu-ui-toolkit/custom-icon-lookup
Only Lars Karlitski can upload to this branch. If you are Lars Karlitski please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Lars Karlitski
Project:
Ubuntu UI Toolkit
Status:
Abandoned

Recent revisions

1233. By Lars Karlitski

unitythemeiconprovider: typedef shared IconTheme pointer

1232. By Lars Karlitski

Icon10: give source an empty fallback

1231. By Lars Karlitski

unitythemeiconprovider: use QStandardLocation

1230. By Lars Karlitski

unitythemeiconprovider: also return the largest icon when requested size is 0

There's a test and a bug about it. Seems to be expected behavior.

1229. By Lars Karlitski

unitythemeiconprovider: support size == -1

Qt sets requestedSize to -1 if no size has been specified. Return the largest
available icon in that case.

1228. By Lars Karlitski

unitythemeiconprovider: don't load icons that might not be used

Only load the icon that has the best matching size, not the ones encountered
while searching for it.

1227. By Lars Karlitski

tst_components: set XDG_DATA_DIRS so that icons are found

1226. By Lars Karlitski

unitythemeiconprovider: use qgetenv instead of getenv

1225. By Lars Karlitski

Icon: remove unnecessary sizing workaround

UnityThemeIconProvider behaves correctly now for small icon sizes.

This patch also makes sure that icons are always drawn with the correct aspect
ratio. Consumers only need to supply a height, whereas they needed to set both
width and height.

In the process, the update() function was removed and is thus not called when
the width and height of the Icon changes. This causes no regressions, as Qt
doesn't reload icons with the same url anyway.

1224. By Lars Karlitski

unitythemeiconprovider: manually load icons

Previously, UnityThemeIconProvider used QIcon::fromTheme() to lookup and load
icons. That function uses fdo's default icon lookup algorithm: it looks at the
current theme and all parent themes for each icon in turn. We'd prefer a
breadth-first search, where all icon names are looked up in the current theme
before falling back to the parent themes (see lp: #1324184). This patch
implements fdo's FindBestIcon() algorithm, which behaves like that.

It also now properly support rectangular icons and always returns an icon with
the requested size (adjusted for preserving the aspect ratio).

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:ubuntu-ui-toolkit
This branch contains Public information 
Everyone can see this information.

Subscribers