VirtualBox

Changeset 47634 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 9, 2013 12:06:25 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
87835
Message:

FE/Qt: Popup-center: Anti-aliasing support for popup-pane frame.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp

    r47633 r47634  
    384384void UIPopupPane::paintEvent(QPaintEvent*)
    385385{
    386     /* Compose painting rectangle: */
    387     const QRect rect(0, 0, width(), height());
     386    /* Compose painting rectangle,
     387     * Shifts are required for the antialiasing support: */
     388    const QRect rect(1, 1, width() - 2, height() - 2);
    388389
    389390    /* Create painter: */
     
    407408    int iDiameter = 6;
    408409    QSizeF arcSize(2 * iDiameter, 2 * iDiameter);
    409     path.moveTo(iDiameter, 0);
     410    path.moveTo(rect.x() + iDiameter, rect.y());
    410411    path.arcTo(QRectF(path.currentPosition(), arcSize).translated(-iDiameter, 0), 90, 90);
    411     path.lineTo(path.currentPosition().x(), rect.height() - iDiameter);
     412    path.lineTo(path.currentPosition().x(), rect.y() + rect.height() - iDiameter);
    412413    path.arcTo(QRectF(path.currentPosition(), arcSize).translated(0, -iDiameter), 180, 90);
    413     path.lineTo(rect.width() - iDiameter, path.currentPosition().y());
     414    path.lineTo(rect.x() + rect.width() - iDiameter, path.currentPosition().y());
    414415    path.arcTo(QRectF(path.currentPosition(), arcSize).translated(-iDiameter, -2 * iDiameter), 270, 90);
    415     path.lineTo(path.currentPosition().x(), iDiameter);
     416    path.lineTo(path.currentPosition().x(), rect.y() + iDiameter);
    416417    path.arcTo(QRectF(path.currentPosition(), arcSize).translated(-2 * iDiameter, -iDiameter), 0, 90);
    417418    path.closeSubpath();
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette