Changeset 286 for trunk/src/gui/util/qsystemtrayicon_pm.cpp
- Timestamp:
- Nov 3, 2009, 3:59:46 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/util/qsystemtrayicon_pm.cpp
r283 r286 118 118 QRect QSystemTrayIconSys::geometry() 119 119 { 120 // @todo use xstQuerySysTrayIconRect() 121 return QRect(); 120 QRect rect; 121 RECTL rcl; 122 if (xstQuerySysTrayIconRect(winId(), 0, &rcl)) { 123 int sh = QApplication::desktop()->height(); 124 // flip y coordinates 125 rcl.yTop = sh - rcl.yTop; 126 rcl.yBottom = sh - rcl.yBottom; 127 rect.setCoords(rcl.xLeft, rcl.yTop, rcl.xRight, rcl.yBottom); 128 } 129 return rect; 122 130 } 123 131 … … 137 145 QSystemTrayIcon::MessageIcon type, int timeOut) 138 146 { 139 // @todo use xstShowSysTrayIconBalloon() 147 uint uSecs = 0; 148 if ( timeOut < 0) 149 uSecs = 10000; //10 sec default 150 else uSecs = (int)timeOut; 151 152 // so far, we use fallbacks 153 // @todo use xstShowSysTrayIconBalloon() when it's implemented 154 QRect iconPos = geometry(); 155 if (iconPos.isValid()) { 156 QBalloonTip::showBalloon(type, title, message, q, iconPos.center(), uSecs, true); 157 } 140 158 } 141 159
Note:
See TracChangeset
for help on using the changeset viewer.