VirtualBox

Changeset 69671 in vbox for trunk


Ignore:
Timestamp:
Nov 13, 2017 12:07:22 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8694: HiDPI support for initial Selector UI window geometry, get at least 1/4, e.g. 50% of width and height of the available host-screen geometry on first start.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r69500 r69671  
    25962596    while (0);
    25972597
     2598    /* Get available-geometry [of screen with point (iX, iY) if possible]: */
     2599    const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
     2600                                          gpDesktop->availableGeometry();
     2601
    25982602    /* Use geometry (loaded or default): */
    2599     QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(0, 0, 770, 550);
     2603    QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(QPoint(0, 0), availableGeometry.size() * .50 /* % */);
    26002604
    26012605    /* Take hint-widget into account: */
    26022606    if (pWidget)
    26032607        geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint()));
    2604 
    2605     /* Get available-geometry [of screen with point (iX, iY) if possible]: */
    2606     const QRect availableGeometry = fOk ? gpDesktop->availableGeometry(QPoint(iX, iY)) :
    2607                                           gpDesktop->availableGeometry();
    26082608
    26092609    /* In Windows Qt fails to reposition out of screen window properly, so doing it ourselves: */
Note: See TracChangeset for help on using the changeset viewer.

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