horsicq / DIE-engine

DIE engine
MIT License
2.29k stars 317 forks source link

Small window on HDPI screens #71

Open blue-devil opened 1 year ago

blue-devil commented 1 year ago

Hello @horsicq

I have started using the AppImage release of Detect it easy v3.06 on Linux (ArchLinux) and the parameters below do not work on my HDPI screen:

/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2 ./Detect_It_Easy-3.06-x86_64.AppImage $*
/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=1  ./Detect_It_Easy-3.06-x86_64.AppImage $*
/usr/bin/env GDK_SCALE=2 ./Detect_It_Easy-3.06-x86_64.AppImage $*

Temporary workaround

So I downloaded die_3.06_portable_Ubuntu_20.04_amd64.tar.gz When i run die.sh from commandline it gave me this error of missing libraries:

./die.sh 
./base/die: error while loading shared libraries: libicui18n.so.66: cannot open shared object file: No such file or directory

Apparently i am missing those libraries, but i have already using the latest libicu on my arch linux (btw) machine. Totally by chance I have realized that Binary Ninja v3.1.3469 also uses that library and i copy/paste libicui18n.so.66, libicudata.so.66 and libicuuc.so.66 files inside base folder. Then I do not touch die.sh file, instead i have created new script for myself to copy under /usr/bin:

#!/bin/bash

export DETECTITEASY_HOME="/opt/scttools/scanners/detect-it-easy/v3_06/"

/usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2 $DETECTITEASY_HOME/die.sh $*

With the latest script above i can now get a normal size window on my HDPI screen.

horsicq commented 1 year ago

Thanks a lot for the testing!

BTW did you try the file? It is for ArchLinux: https://github.com/horsicq/DIE-engine/releases/download/3.06/detect-it-easy-3.06-1-x86_64.pkg.tar.zst

pacman -U detect-it-easy-3.06-1-x86_64.pkg.tar.zst

Or these: https://aur.archlinux.org/packages/detect-it-easy https://aur.archlinux.org/packages/detect-it-easy-git

horsicq commented 1 year ago

AppImage has been compiled for old version of Qt to run everywhere. So QT_SCALE_FACTOR does not work. :(

blue-devil commented 1 year ago

I have tried those and they are working. But the problem is the view/scaling on HDPI screen. The packeges you provide above are also very small on a HDPI screen.

# pacman -U detect-it-easy-3.06-1-x86_64.pkg.tar.zst
# die                    ;; draws small screen on HDPI
# /usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2 /usr/bin/die ;;draws normal window on HDPI screen
blue-devil commented 1 year ago

AppImage has been compiled for old version of Qt to run everywhere. So QT_SCALE_FACTOR does not work. :(

No problem, other packages are working

horsicq commented 1 year ago

I have tried those and they are working. But the problem is the view/scaling on HDPI screen. The packeges you provide above are also very small on a HDPI screen.

# pacman -U detect-it-easy-3.06-1-x86_64.pkg.tar.zst
# die                    ;; draws small screen on HDPI
# /usr/bin/env QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_SCALE_FACTOR=2 /usr/bin/die ;;draws normal window on HDPI screen

Ok. I will take a look.