Bug 295712

Summary: Issues with tango icons in yast-qt
Product: [openSUSE] openSUSE 10.3 Reporter: Andreas Jaeger <aj>
Component: YaST2Assignee: Stefan Hundhammer <shundhammer>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: aj, dmueller, francis
Version: Alpha 6   
Target Milestone: ---   
Hardware: 64bit   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 294813    
Attachments: pixelated icons in yast

Description Andreas Jaeger 2007-07-30 17:17:42 UTC
+++ This bug was initially created as a clone of Bug #294813 +++

AJ said on the mailinglist to report problems with tango icons in bugzilla, so I'll report a couple of problems I have with them, besides them being ugly and depressing, as well as total misfits in KDE3 which will of course be the preferred desktop for 10.3 by a vast majority of users.

1) In the left pane of the yast control center the icons look like one big block. I suggest to either use smaller icons, or add a few pixels of additional space between the items to make it look less cluttered. Will attach screenshot.

Please see bug 294813 for details, we should add spacing around the icons.
Comment 1 Lukas Ocilka 2007-07-31 06:04:44 UTC
HuHa, please, add some padding between icons (left panel) in YCC.
Comment 2 Stefan Hundhammer 2007-07-31 09:42:45 UTC
Spacing around those icons has to be embedded inside the icons. That's why nearly all icons usually have a border of at least one, more commonly two pixels around them.

There is no way in Qt I know of to add any additional spacing there. The normal solution is to add any desired borders to the icons.
Comment 3 Dirk Mueller 2007-07-31 12:10:59 UTC
QIconView has a gridX/Y property that can be set, or QItemViewItem can be inherited to call setPixmapRect with an additional margin. 

assuming that the left pane is a QListView, there is QListViewItem::setHeight(). If that appears to be complicated, it should be trivial to add the two lines of code that add additional margin to the icons as they're loaded. 

Assuming that this is going to be the Qt4 port, you can apply a custom CSS stylesheet to the items in the left pane (which might be loaded on runtime, to make it themeable by the different themes) to apply margin or padding. 

The stylesheet would have the advantage that artists usually know how to use CSS and don't have to wait for development to catch up with their wishes. 



Comment 4 Jakub Steiner 2007-08-23 09:33:15 UTC
I don't think making a subset of icons use more padding than the rest is the appropriate solution here. Reassigning to the component owner as I don't believe it's an icon artwork problem, but layout.
Comment 5 Stefan Hundhammer 2007-08-24 12:56:37 UTC
y2controlcenter uses a (Qt3) QListBox here. QListBox does not have any easy way to add spacing between items. dmueller suggested to derive a custom item class from QListBoxPixmap and overwrite its ::height() method. To make sure the item is vertically centered (important for example if it's highlighted), it will also be necessary to overwrite its ::paint() method and do the centering there.

That's all a far cry from using QListBox::insertItem( QPixmap ).
Comment 6 Stefan Hundhammer 2007-08-24 14:40:40 UTC
It's not as trivial as hinted in comment #3, but it is possible to automatically add a border around the icons upon loading, albeit the code is not exactly intuitive.

Whatever, it works.
Comment 7 Francis Giannaros 2007-09-07 13:25:22 UTC
In the navigation some of the icons appear pixelated (see attachment below), though on the right they appear perfectly clear and fine.
Comment 8 Francis Giannaros 2007-09-07 13:25:49 UTC
Created attachment 162725 [details]
pixelated icons in yast
Comment 9 Stefan Hundhammer 2007-09-07 13:29:12 UTC
The original bug this is all about is fixed. If there is a new bug, please open a new one rather than hijacking an existing one.
Comment 10 Francis Giannaros 2007-09-07 13:59:20 UTC
I presumed it was actually related to the new fix that resulted from this bug report (and the bug is about 'Issues with tango icons in yast-qt'), but as you wish: Bug 308641 Submitted.