Subversion Repositories tpanel

Rev

Rev 191 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 191 Rev 217
Line 464... Line 464...
464
    }
464
    }
465
    else
465
    else
466
        this->move(scale(rect.left()), scale(rect.top()));
466
        this->move(scale(rect.left()), scale(rect.top()));
467
 
467
 
468
    // Font size calculation
468
    // Font size calculation
469
    double refWidth = gPageManager->getSettings()->getWith();
469
    double refWidth = gPageManager->getSettings()->getWidth();
470
    double refHeight = gPageManager->getSettings()->getHeight();
470
    double refHeight = gPageManager->getSettings()->getHeight();
471
    double dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch();
471
    double dpi = QGuiApplication::primaryScreen()->logicalDotsPerInch();
472
    double amxDpi = dpi / ((width > height) ? width : height) * ((refWidth > refHeight) ? refWidth : refHeight);
472
    double amxDpi = dpi / ((width > height) ? width : height) * ((refWidth > refHeight) ? refWidth : refHeight);
473
    mRatioFont = qMin(height * amxDpi / (dpi * refHeight), width * amxDpi / (dpi * refWidth));
473
    mRatioFont = qMin(height * amxDpi / (dpi * refHeight), width * amxDpi / (dpi * refWidth));
474
//    MSG_PROTOCOL("qMin(" << height << " * " << amxDpi << " / " << "(" << dpi << " * " << refHeight << "), " << width << " * " << amxDpi << " / " << "(" << dpi << " * " << refWidth << "))");
474
//    MSG_PROTOCOL("qMin(" << height << " * " << amxDpi << " / " << "(" << dpi << " * " << refHeight << "), " << width << " * " << amxDpi << " / " << "(" << dpi << " * " << refWidth << "))");