Changeset 284


Ignore:
Timestamp:
Nov 3, 2009, 3:55:19 AM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: QSystemTrayIcon: Make sure that in "we don't have window masks" mode the Qt-drawn notification balloon is positioned correctly not only when the system tray widget is in the top left corner of the screen [vendor bug]. Also, enable this "no mask" mode on OS/2 where we don't have masks for top-level widgets at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/util/qsystemtrayicon.cpp

    r2 r284  
    575575
    576576    QPainterPath path;
    577 #if defined(QT_NO_XSHAPE) && defined(Q_WS_X11)
     577#if )
    578578    // XShape is required for setting the mask, so we just
    579     // draw an ugly square when its not available
     579    // draw an ugly square when its not available
    580580    path.moveTo(0, 0);
    581581    path.lineTo(sz.width() - 1, 0);
     
    583583    path.lineTo(0, sz.height() - 1);
    584584    path.lineTo(0, 0);
    585     move(qMax(pos.x() - sz.width(), scr.left()), pos.y());
     585    if (arrowAtTop && arrowAtLeft) {
     586        move(qMax(pos.x(), scr.left() + 2), pos.y());
     587    } else if (arrowAtTop && !arrowAtLeft) {
     588        move(qMin(pos.x() - sh.width(), scr.right() - sh.width() - 2), pos.y());
     589    } else if (!arrowAtTop && !arrowAtLeft) {
     590        move(qMin(pos.x() - sh.width(), scr.right() - sh.width() - 2), pos.y() - sh.height());
     591    } else if (!arrowAtTop && arrowAtLeft) {
     592        move(qMax(pos.x(), scr.x() + 2), pos.y() - sh.height());
     593    }
    586594#else
    587595    path.moveTo(ml + rc, mt);
Note: See TracChangeset for help on using the changeset viewer.