Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
kdebase3
kdm-align-userlist-labels.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdm-align-userlist-labels.diff of Package kdebase3
Index: kdm/kfrontend/kgreeter.cpp =================================================================== --- kdm/kfrontend/kgreeter.cpp.orig +++ kdm/kfrontend/kgreeter.cpp @@ -59,6 +59,7 @@ Foundation, Inc., 51 Franklin Street, Fi #include <qtooltip.h> #include <qaccel.h> #include <qeventloop.h> +#include <qbitmap.h> #include <pwd.h> #include <grp.h> @@ -313,6 +314,33 @@ KGreeter::insertUser( const QImage &defa if ( p.isNull() ) p = default_pix; + const int size = 48; + const int wdiff = size - p.size().width(); + const int hdiff = size - p.size().height(); + if (wdiff>0 || hdiff>0) { + QPixmap pix(p); + QBitmap mask; + mask.convertFromImage(p.createAlphaMask()); + pix.resize(size, size); + bitBlt(&pix, wdiff/2.0, hdiff/2.0, &pix); + if (mask.isNull()) { + mask = QBitmap(size, size); + mask.fill(Qt::color1); + } + else { + mask.resize(size, size); + bitBlt(&mask, wdiff/2.0, hdiff/2.0, &mask); + } + QPainter pa(&mask); + pa.fillRect(0, 0, size, hdiff/2.0, Qt::color0); + pa.fillRect(0, 0, wdiff/2.0, size, Qt::color0); + pa.fillRect(size-(wdiff/2.0), 0, size, size, Qt::color0); + pa.fillRect(0, size-(hdiff/2.0), size, size, Qt::color0); + pa.end(); + pix.setMask(mask); + p=pix.convertToImage(); + } + QString realname = KStringHandler::from8Bit( ps->pw_gecos ); realname.truncate( realname.find( ',' ) ); if (realname.isEmpty() || realname == username)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor