Changeset 972819d in subsurface


Ignore:
Timestamp:
Apr 16, 2017, 8:26:40 AM (6 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
c88be99
Parents:
20f525c
Message:

QML UI: more fine tuning of the magic shift factor

Now it should also work on devices with device pixel ratios of
1.3, 1.33, or 1.4.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mobile-widgets/qmlprofile.cpp

    re42bf2c r972819d  
    4141        double magicValues[] = { 0.0, 0.1, 0.25, 0.33, 0.375, 0.40, 0.42};
    4242        qreal magicShiftFactor = 0.0;
    43         if (dpr < 1.5) {
     43        if (dpr < 1.3) {
    4444                magicShiftFactor = magicValues[0];
    4545        } else if (dpr > 6.0) {
     
    5050                int lower = (int)dpr;
    5151                magicShiftFactor = (magicValues[lower] * (lower + 1 - dpr) + magicValues[lower + 1] * (dpr - lower));
     52                if (dpr < 1.45)
     53                        magicShiftFactor -= 0.03;
    5254        }
    5355        // now set up the transformations scale the profile and
Note: See TracChangeset for help on using the changeset viewer.