freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/main


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/maingui.cpp: Make the initial size DPI-aware.
Date: Sat, 27 Aug 2022 15:34:19 +0000

Charlie Jiang pushed to branch gsoc-2022-chariri-3 at FreeType / FreeType Demo Programs

Commits:

  • c50ecd6f
    by Charlie Jiang at 2022-08-27T23:33:57+08:00
    * src/ftinspect/maingui.cpp: Make the initial size DPI-aware.
    

1 changed file:

Changes:

  • src/ftinspect/maingui.cpp
    ... ... @@ -11,6 +11,7 @@
    11 11
     #include <QMessageBox>
    
    12 12
     #include <QSettings>
    
    13 13
     #include <QScrollBar>
    
    14
    +#include <QDesktopWidget>
    
    14 15
     #include <QMimeData>
    
    15 16
     
    
    16 17
     #include <freetype/ftdriver.h>
    
    ... ... @@ -319,8 +320,7 @@ MainGUI::createLayout()
    319 320
     
    
    320 321
       ftinspectLayout_->setSizeConstraint(QLayout::SetNoConstraint);
    
    321 322
       layout()->setSizeConstraint(QLayout::SetNoConstraint);
    
    322
    -  ftinspectWidget_->resize(1400, 900);
    
    323
    -  resize(1400, 900);
    
    323
    +  resize(1400 * logicalDpiX() / 96, 700 * logicalDpiY() / 96);
    
    324 324
     
    
    325 325
       statusBar()->hide(); // remove the extra space
    
    326 326
       setCentralWidget(ftinspectWidget_);
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]