KDElibs: KSystemTray: On window close dialog
elcuco at kdemail.net
Thu Sep 16 15:37:45 BST 2004
int tw = Global::tray->width();
int th = Global::tray->height();
int w = desktopWidth / 4;
int h = desktopHeight / 9;
int x = g.x() + tw/2 - w/2; // Center the rectange in the systray icon
int y = g.y() + th/2 - h/2;
if (x < 0) x = 0; // Move the rectangle to stay in the
if (y < 0) y = 0;
if (x + w > desktopWidth) x = desktopWidth - w;
if (y + h > desktopHeight) y = desktopHeight - h;
// Grab the desktop and draw a circle arround the icon:
QPixmap shot = QPixmap::grabWindow(qt_xrootwin(), x, y, w, h);
Will this work for right-to-left desktops? please try running "kicker
--reverse" and see if it works, as I am not quite sure about it.
ביום חמישי, 16 בספטמבר 2004, 10:21, נכתב על ידי Olivier Goffart:
> Le Mercredi 15 Septembre 2004 23:37, Sébastien Laoût [temporar] a écrit :
> > I've implemented it here:
> > http://les83plus.free.fr/sebastien.laout/basket/usability-on-close-info.h
> >tm l (screenshots + comments + code)
> looks good.
> Maybe you should use KMessageBox::shouldBeShown to don't take the
> screenshot if the user already clicked on the "don't show again"
> > I am asking you if it can be added to KDE libs for KDE 3.4.
> > Since then, every app could call the KSystemTray::hideWindowMessage() or
> > other method to display it (displayHideMessage()...).
> > This also would uniform such feedback to the user...
> Yes, please.
> > Unfortunaly, I haven't any CVS account and even less skill in CVS :-/
> > So I couldn't do it myself.
> You still may ask for one.
> > I've writed the code to put into KDE CVS:
> > http://les83plus.free.fr/sebastien.laout/basket/systray-close-message-int
> >o- kdelibs.txt
> We need to add a way to have a dontAskAgainName checkbox in the queued
> messagebox, and you will be able to remove your FIXME :-) (I need this in
> Kopete too)
> You didn't remove the Pixmap form the QMimeFactory , you probably shoud.
> Problem: if you uses queuedMessageBox, you can't.
> don't forget to add the API documentation.
> I think you can obtaon the application name from KGlobal
diego, kde-il translation team, http://www.kde.org/il
Please avoid sending me Word or PowerPoint attachments.
More information about the kde-core-devel