[yast-commit] r40479 - in /trunk/control-center: VERSION package/yast2-control-center.changes src/y2controlcenterview.cpp
Author: sh-sh-sh Date: Fri Aug 24 16:43:07 2007 New Revision: 40479 URL: http://svn.opensuse.org/viewcvs/yast?rev=40479&view=rev Log: Added borders around group icons (bug #295712) Modified: trunk/control-center/VERSION trunk/control-center/package/yast2-control-center.changes trunk/control-center/src/y2controlcenterview.cpp Modified: trunk/control-center/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center/VERSION?rev=40479&r1=40478&r2=40479&view=diff ============================================================================== --- trunk/control-center/VERSION (original) +++ trunk/control-center/VERSION Fri Aug 24 16:43:07 2007 @@ -1 +1 @@ -2.15.2 +2.15.3 Modified: trunk/control-center/package/yast2-control-center.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center/package/yast2-control-center.changes?rev=40479&r1=40478&r2=40479&view=diff ============================================================================== --- trunk/control-center/package/yast2-control-center.changes (original) +++ trunk/control-center/package/yast2-control-center.changes Fri Aug 24 16:43:07 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Aug 24 16:41:49 CEST 2007 - sh@suse.de + +- Added borders around group icons (bug #295712) +- V 2.15.3 + +------------------------------------------------------------------- Fri Aug 24 14:10:08 CEST 2007 - sh@suse.de - Don't show menu entry in desktops other than KDE or GNOME Modified: trunk/control-center/src/y2controlcenterview.cpp URL: http://svn.opensuse.org/viewcvs/yast/trunk/control-center/src/y2controlcenterview.cpp?rev=40479&r1=40478&r2=40479&view=diff ============================================================================== --- trunk/control-center/src/y2controlcenterview.cpp (original) +++ trunk/control-center/src/y2controlcenterview.cpp Fri Aug 24 16:43:07 2007 @@ -39,6 +39,9 @@ #define NONSTANDARD__LIST_BOX_COLORS 0 #define USE_BUTTONS 0 +#define GROUP_ICON_HORIZ_BORDER 1 +#define GROUP_ICON_VERT_BORDER 1 + #define LEFTLISTBOXWIDTH 200 //just guessed @@ -276,21 +279,37 @@ { QString icon,groupname; QString icondir = ICON_DIR "/"; - int i=0,firstenabled=-1; - QListBoxPixmap* pixmap; + int i = 0; + int firstenabled = -1; -// _modules->dumpgroups(); + // _modules->dumpgroups(); - //walk through groups and insert icons for them into listbox - for ( const ModGroup* ptr=_modules->firstGroup();ptr;ptr=_modules->nextGroup(),i++) - { - icon=ptr->getIcon(); - groupname=ptr->getName(); - pixmap=new QListBoxPixmap(QPixmap(icondir + icon),groupname); - _listBox->insertItem(pixmap); + // + // Walk through groups and insert icons for them into listbox + // + + for ( const ModGroup* ptr = _modules->firstGroup(); + ptr != 0; + ptr = _modules->nextGroup(), i++) + { + icon = ptr->getIcon(); + groupname = ptr->getName(); + + QPixmap origIcon( QPixmap( icondir + icon ) ); + QPixmap iconWithBorder( origIcon.width() + 2 * GROUP_ICON_HORIZ_BORDER, + origIcon.height() + 2 * GROUP_ICON_VERT_BORDER, + origIcon.depth() ); + QBitmap mask( iconWithBorder.width(), iconWithBorder.height(), true ); + bitBlt( &mask, GROUP_ICON_HORIZ_BORDER, GROUP_ICON_VERT_BORDER, origIcon.mask() ); + iconWithBorder.setMask( mask ); + bitBlt( &iconWithBorder, GROUP_ICON_HORIZ_BORDER, GROUP_ICON_VERT_BORDER, &origIcon ); + + QListBoxPixmap * pixmapItem = new QListBoxPixmap( iconWithBorder, groupname ); + _listBox->insertItem( pixmapItem ); + if (ptr->isEmpty()) { - pixmap->setSelectable(false); + pixmapItem->setSelectable(false); } else if (firstenabled<0) { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
sh-sh-sh@svn.opensuse.org