Switch to Qt Resource-based icon theme for Kexi with breeze as cross-platform default

Authored by staniek on Mar 8 2016, 10:32 PM.



This review can be considered as a tech preview.

Some random background

Using the Qt resource(s) as source for icons helps to control look of the application and somehow its branding across supported platforms. The current offering of icons themes, technology behind them (in KF5) and limitation of XDG standard degrades quality of applications. Icons from various themes can be uncontrollably mixed (per accident or decision of Linux distribution authors), what leads to a situation when applications look differently than in handbooks or screen shots shared on support forums. Most desktop environments other than KDE Plasma have different settings for icon themes, often even icon sides differ.

Proposed solution is radical and based on many years of observations. The importance of having single icon theme is currently over-aggregated in my opinion. End users of Kexi run browser "applications" that have no such "consistence" built-in and still discoverability of the GUI isn't degraded. Popular desktop application on Windows and Mac have own icons themes (and on Windows -- often widget styles) what over years does not make the platforms less popular than "consistent" Linux.

Finally, the solution of Qt Resource-based icons themes opens possibilities such as:

  • fast app installation without copying 8000 icon files
  • independence versus future changes in icon theme(s) - the theme can be packaged with application
  • prepared infrastructure for building mobile or embedded version of the app: 8000 icon files no longer needed
  • making apps portable (in the sense of portableapps.com; no needto put 8000 icon files on an USB stick)
  • the icon theme resources are 100% cross platform (Windows, Linux, Mac), and support compression (useful for .svg files)
  • the icon theme resources are available for use with Qt Quick apps
  • close future: the icon theme resource can be generated directly from the breeze-icons.git repository by running 'make install'
  • future: the icon theme resources can be packaged to facilitate sharing between apps on Linux; in case of Windows and Mac including with application installation is a norm, and this is very easy thanks to the compact format
  • future: the icon theme resource can be made minimal by removing unused icons, this is possible already thanks to having scripts that recognize icon usage, and was discussed on ##kate IRC channel (@kfunk)
  • future: symbolic links (used by Breeze) can be handled in a number of ways
  • future: light and dark variants of themes can be mixed, e.g. to achieve dark sidebars for a light app (http://cdn1.tnwcdn.com/wp-content/blogs.dir/1/files/2013/03/Screen-Shot-2013-03-07-at-5.19.51-PM-730x393.png), this is not possible with KDE themes API nor addressed by the XDG - traditionally there's one theme in use at a time


  • works on Linux & Windows
  • old oxygen icons removed, breeze is the only fully officially supported theme; extra themes (as .rcc files) may be developed in separate repositories
  • no support for themes from individual files: this can be developed and supplied as non-default option but for now no other icon theme is complete for Kexi
  • two levels of icon resources: Kexi's own kexi_breeze.rcc and generic breeze icons breeze.rcc
  • breeze.rcc should be generated from breeze-icons.git
  • Icons from kexi_breeze.rcc have priority over breeze.rcc
  • updated icons names based on the list from https://community.kde.org/Calligra/Icons/3.0
  • Kexi icon names are enclosed with KexiIcon macro (and similar ones), generic breeze icons are enclosed with kiIcon macro (and similar ones); this is useful to track missing icons using scripts from devtools/iconcheck/
  • by the way, move special pixmaps such as tableview_pen to resources
Test Plan

To make it work, uncompress the breeze icons resource and kexi icons resource (http://kexi-project.org/tmp/breeze.rcc.bz2, http://kexi-project.org/tmp/kexi_breeze.rcc.bz2) to PREFIX/share/kexi/icons/. Both files have dirs such as "icons/actions/32" etc. just like any XDG-compatible theme should have.

Kexi with properly working icons (both the generic Breeze icons such as edit-paste.svg, and Kexi's own icons such as form.svg):

Diff Detail

R71 Kexi
Lint Skipped
Unit Tests Skipped
staniek updated this revision to Diff 2631.Mar 8 2016, 10:32 PM
staniek retitled this revision from to Switch to Qt Resource-based icons for Kexi with breeze as cross-platform default.
staniek updated this object.
staniek edited the test plan for this revision. (Show Details)
staniek set the repository for this revision to R71 Kexi.
staniek added a project: KEXI.
staniek added a subscriber: Kexi-Devel-list.
staniek retitled this revision from Switch to Qt Resource-based icons for Kexi with breeze as cross-platform default to Switch to Qt Resource-based icon theme for Kexi with breeze as cross-platform default.Mar 8 2016, 10:54 PM
staniek updated this object.
staniek updated this object.Mar 9 2016, 8:09 AM
staniek added a reviewer: kfunk.
staniek added a subscriber: kfunk.
staniek updated this object.Mar 9 2016, 9:28 AM
staniek updated this object.Mar 9 2016, 9:36 AM
kfunk removed a reviewer: kfunk.Mar 9 2016, 10:42 AM
kfunk removed a subscriber: kfunk.

@piggz could you please approve? it was pushed in March already (7af96966d08fb3063a) and improved many times since

kossebau resigned from this revision.Jun 7 2017, 4:01 PM
piggz accepted this revision.Jan 19 2018, 5:36 PM
This revision is now accepted and ready to land.Jan 19 2018, 5:36 PM
staniek closed this revision.Jan 19 2018, 9:15 PM

Landed long ago.