code-google-com / arora

Automatically exported from code.google.com/p/arora
0 stars 0 forks source link

Arora doesn't use the system icon theme #956

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, the icons Arora uses in its toolbar and menus are quite obviously 
not the icons specified by the system icon theme.

The proper approach to loading toolbar and application icons in a Qt4 app is, 
with the refresh icon as an example, to use QIcon::fromTheme("view-refresh"); 

view-refresh is taken from the XDG icon-naming spec and fromTheme will search 
the system icon theme, then the fallback theme, then the :\icons resource path.

Ideally, you would install any icons not covered by the icon-naming spec in the 
appropriate size and category subfolders of the fallback theme at 
$PREFIX/share/icons/hicolor/

Failing that, you can specify a QIcon to use as a fallback via the second 
argument to fromTheme.

Here is all the relevant documentation:

http://qt-project.org/doc/qt-4.8/qicon.html#fromTheme
http://qt-project.org/doc/qt-4.8/qicon.html#themeSearchPaths (Icon lookup 
semantics)
http://standards.freedesktop.org/icon-theme-spec/latest/ar01s07.html
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html#n
ames

Original issue reported on code.google.com by stephan....@gmail.com on 8 May 2012 at 11:25

GoogleCodeExporter commented 9 years ago
Currently the code uses QIcon::FromTheme, for example from browserwindow.cpp

m_fileNewWindowAction->setIcon(QIcon::fromTheme(QLatin1String("window-new")));

Refresh uses by the way the Qt standard that supersedes view-refresh

m_reloadIcon = style()->standardIcon(QStyle::SP_BrowserReload);

If you want to provide a specific example you can re-open this bug.

Original comment by ice...@gmail.com on 10 May 2012 at 3:05

GoogleCodeExporter commented 9 years ago
Since posting this, I've found that something's messed up with my theming setup 
and pure Qt apps (as opposed to ones also using kdelibs) are getting a 
different icon theme than everything else on the system. (KDE, Pure GTK+, etc.)

My bad.

Original comment by stephan....@gmail.com on 10 May 2012 at 3:24