bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#20432: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar


From: Jan Djärv
Subject: bug#20432: GDK_SCALE=2 GDK_DPI_SCALE=0.5 destroys GTK+ 3 scroll bar
Date: Thu, 14 May 2015 13:34:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hi.

Den 2015-04-26 12:01, Felix E. Klee skrev:
I'm running Emacs on high DPI screen, and for scaling icons and other UI
elements in GTK+ applications, I've set in the environment:

     GDK_SCALE=2
     GDK_DPI_SCALE=0.5

This, however, confuses EMACS: The scrollbar gets squished.

This GTK feature is very poorly designed. We can not support it correctly, as we don't use Gtk+ exclusively. There is a race between Gtk+ and the window manager and Emacs that will result in different frame sizes on frame creation. Sometimes its the default size (80x34), sometimes its twice as big.

Also, the Gtk+ code blindly multiplies anything with GTK_SCALE. So for example, given GTK_SCALE=2, if we have font size 15, it becomes 30. But in order to compensate for this multiplication we need to divide with 2 before passing sizes to Gtk+. So 15 becomes 7 (integer division), which Gtk+ turns to 14. So there will be glitches, live with it.

But at least we draw things correctly in the trunk now.

        Jan D.




In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
  of 2015-04-20 on bitzer.hoetzel.info
Windowing system distributor `The X.Org Foundation', version 11.0.11701000
System Description: Arch Linux

Configured using:
  `configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
  --localstatedir=/var --with-x-toolkit=gtk3 --with-xft
  'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
  --param=ssp-buffer-size=4' CPPFLAGS=-D_FORTIFY_SOURCE=2
  LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro'

Important settings:
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
   tooltip-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   buffer-read-only: t
   line-number-mode: t
   transient-mark-mode: t

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...
Quit
Making completion list...
Quit
scroll-up-command: End of buffer

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 74597 8753)
  (symbols 48 17662 0)
  (miscs 40 64 138)
  (strings 32 9283 4419)
  (string-bytes 1 253558)
  (vectors 16 8988)
  (vector-slots 8 384078 17367)
  (floats 8 64 222)
  (intervals 56 183 16)
  (buffers 960 13)
  (heap 1024 24992 889))








reply via email to

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