![]() Registered Member ![]()
|
I am trying to use KAction with a selfmade application specific icons.
All other stuff works but the selfmade icons are not shown correctly. My first attempt goes like this:
which works fine and uses the document-new.png icon which is shipped with KDE. My next attempt is:
with selfmade icons called document-newXX.png copied to the locations as below. (document-newXX.png are just a plain copies of the document-new.png icons of appropriate size)
but in this case the icon is not displayed correctly. A different icon is shown. In the "Settings -> Configure Toolbar" dialog I can change the icon but I can select only those shipped with KDE although document-newXX.png is present in the "Configure Toolbar" icon selection dialog. What do I do wrong ![]() I am using KDE 4.3.5 Thank you very much By the way:
returns correct path for both icons. |
![]() Administrator ![]()
|
Have you tried naming the icon "document-new-myapp" and naming the *.png files appropriately? The XDG specification requires that certain behaviours are observed, which may be causing problems. Also, try to keep everything lower cased.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I tried everything lowercase, I tried myapp-iconname.png. I also tried document-new-myapp.png, nothing works. I put everything under /usr/share/icons/oxygen/actions/.. and also in the application's working directory. I also did some tries with QIcon::addFile(...).
The behaviour changes slightly, but in general I do not get any reasonable icon on the button. I am starting to get frustrated because I cannot implement my application without custom button icons. Any further ideas ![]() |
![]() KDE Developer ![]()
|
It is probably a mixture of correct filenaming and in source reference, as well as using the correct CMake macro.
For example look at KJotsWidget, line 243. It is referencing an application specific icon "edit-delete-page".
http://websvn.kde.org/trunk/KDE/kdepim/ ... iew=markup The icon files are in the application's icon directory and named like this
http://websvn.kde.org/trunk/KDE/kdepim/kjots/icons/ So assuming that "edit-delete-page" is the choosable name part, an action icon obviously needs an "actions" prefix and a prefix containing size and a theme hint. (the KJots directory also has hicolor versions for the app icon itself) Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Now it works !!!
After editing CMakeLists.txt and adjusting the icon naming everything works as expected. Thank you for your help. Cheers |
Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]