huan / docker-wechat

DoChat is a Dockerized WeChat (盒装微信) PC Windows Client for Linux
https://hub.docker.com/r/zixia/wechat
Apache License 2.0
2.25k stars 203 forks source link

make the auto screen size as an option for small screens in debian buster #13

Open ziyouchutuwenwu opened 4 years ago

ziyouchutuwenwu commented 4 years ago

Hi, my laptop is small, the default option of wechat makes everything too big, and could you please make it as an option that user can set manually? thank you very much!

avatar

os:

mmc@debian ~ $ screenfetch
         _,met$$$$$gg.           xxx@debian
      ,g$$$$$$$$$$$$$$$P.        OS: Debian 10 buster
    ,g$$P""       """Y$$.".      Kernel: x86_64 Linux 4.19.0-8-amd64
   ,$$P'              `$$$.      Uptime: 1h 15m
  ',$$P       ,ggs.     `$$b:    Packages: 1672
  `d$$'     ,$P"'   .    $$$     Shell: zsh 5.7.1
   $$P      d$'     ,    $$P     Resolution: 1366x768
   $$:      $$.   -    ,d$$'     DE: XFCE
   $$\;      Y$b._   _,d$P'      WM: Xfwm4
   Y$$.    `.`"Y$$$$P"'          WM Theme: JacWin10
   `$$b      "-.__               GTK Theme: Windows10 [GTK2]
    `Y$$                         Icon Theme: Faenza
     `Y$$.                       Font: 文泉驿等宽微米黑 10
       `$$b.                     CPU: Intel Core i5-3320M @ 4x 3.3GHz [54.0°C]
         `Y$$b.                  GPU: intel
            `"Y$b._              RAM: 5093MiB / 15741MiB
                `""""
huan commented 4 years ago

We have a new feature to set DPI before you start.

You can try to set DOCHAT_DPI=96 to see if it helps?

DOCHAT_DPI=96 dochat.sh

See: https://github.com/huan/docker-wechat#dochat_dpi

ziyouchutuwenwu commented 4 years ago

my screen is small, and this is the default dpi, with -e DOCHAT_DPI=96, chatting dialog size seems to be ok, but the fonts will be bad.

most fonts seems to be ok, some fonts seems to be not good.

big

after i uncheck the auto screen size setting from setting page setting

the screen seems to be like this setting_unchecked

when i run docker with dpi with_dpi

i think maybe this problem also affect the fonts display.

huan commented 4 years ago

Understood.

If we can get to know the registry key and value of that option, then we can be very easy to disable it by config an environment variable.

ziyouchutuwenwu commented 4 years ago

https://github.com/bestwu/docker-wechat

this one, with the default command, the fonts seems to be fine on my laptop. here is the screenshot for the fonts 222

the option "auto screen size" is also checked by default, but screensize is not so big as your docker, it seems as big as your docker command with dpi=96.

huan commented 4 years ago

That's by design: DoChat v0.5 are using a default DPI=120, which is 125% larger than the default setting 96 DPI.

And I found that in Ubuntu, it seems that the font size can follow the DPI setting and will be resized as expected.

I believe there are other settings that need to be set under the Debian distribution.

ziyouchutuwenwu commented 4 years ago

ok, i see, thank you very much!

huan commented 4 years ago

Is there anyone known the following DPI environment variables?

  1. GDK_SCALE
  2. GDK_DPI_SCALE

Will they be helpful for our DoChat? If so, how to use them?