From: Carlos Pita <carlosjosepita@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Robert Pluim <rpluim@gmail.com>, 37689@debbugs.gnu.org
Subject: bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen
Date: Sat, 12 Oct 2019 05:26:54 -0300 [thread overview]
Message-ID: <CAELgYhdkeW8P-4=RG=g3QL3Akh89Cu+WaAPrAEKavDhEQ+_dYw@mail.gmail.com> (raw)
In-Reply-To: <CAELgYhc_yz5h=AHMPB0su5eKBHyKGyinyXF7GWNMkXOPksxRWA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]
Ok, I have arrived at something, I still have to understand the
details but many things are correctly scaled, including widget images.
Icons in the fringe seems to be ok but yet:
1. So checkboxes are weirdly clipped, even if correctly scaled.
2. Not sure about this, but I believe there is a slight vertical misalignment.
3. Default fringe sizes are too small for hidpi screen, they should
change according to screen dpi.
I'm attaching a diff so that you can have an idea of what I am
changing and probably improve on that.
[-- Attachment #2: scale.diff --]
[-- Type: text/x-patch, Size: 808 bytes --]
diff --git a/src/xterm.c b/src/xterm.c
index b49c9d6..c07bced 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -608,7 +608,9 @@ x_cr_draw_image (struct frame *f, GC gc, cairo_pattern_t *image,
int dest_x, int dest_y, bool overlay_p)
{
cairo_t *cr = x_begin_cr_clip (f, gc);
-
+ int scale = xg_get_scale(f);
+ width *= scale;
+ height *= scale;
if (overlay_p)
cairo_rectangle (cr, dest_x, dest_y, width, height);
else
@@ -622,6 +624,7 @@ x_cr_draw_image (struct frame *f, GC gc, cairo_pattern_t *image,
cairo_surface_t *surface;
cairo_pattern_get_surface (image, &surface);
+ cairo_surface_set_device_scale (surface, 1. / scale, 1. / scale);
cairo_format_t format = cairo_image_surface_get_format (surface);
if (format != CAIRO_FORMAT_A8 && format != CAIRO_FORMAT_A1)
{
[-- Attachment #3: Screenshot from 2019-10-12 05-25-09.png --]
[-- Type: image/png, Size: 23505 bytes --]
[-- Attachment #4: Screenshot from 2019-10-12 05-26-09.png --]
[-- Type: image/png, Size: 5172 bytes --]
next prev parent reply other threads:[~2019-10-12 8:26 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 6:28 bug#37689: Fringe pixmaps, widgets, etc. look ridiculously tiny in hidpi screen Carlos Pita
2019-10-10 8:12 ` Eli Zaretskii
2019-10-10 13:26 ` Robert Pluim
2019-10-10 13:37 ` Carlos Pita
2019-10-10 13:47 ` Robert Pluim
2019-10-10 13:36 ` Carlos Pita
2019-10-10 14:21 ` Robert Pluim
2019-10-10 14:33 ` Carlos Pita
2019-10-10 14:37 ` Carlos Pita
2019-10-10 15:06 ` Eli Zaretskii
2019-10-10 15:43 ` Carlos Pita
2019-10-10 15:05 ` Eli Zaretskii
2019-10-10 15:51 ` Carlos Pita
2019-10-10 16:01 ` Carlos Pita
2019-10-10 17:35 ` Eli Zaretskii
2019-10-10 17:39 ` Carlos Pita
2019-10-11 3:26 ` Carlos Pita
2019-10-11 3:48 ` Carlos Pita
2019-10-12 0:51 ` Carlos Pita
2019-10-12 7:28 ` Eli Zaretskii
2019-10-12 7:56 ` Carlos Pita
2019-10-12 8:26 ` Carlos Pita [this message]
2019-10-14 0:40 ` Carlos Pita
2019-10-14 8:33 ` Eli Zaretskii
2019-10-14 13:19 ` Alan Third
2019-10-14 14:00 ` Eli Zaretskii
2019-10-17 11:48 ` Alan Third
2019-10-14 14:37 ` Carlos Pita
2019-10-14 14:54 ` Eli Zaretskii
2019-10-14 15:06 ` Carlos Pita
2019-10-14 15:15 ` Eli Zaretskii
2019-10-14 15:32 ` Carlos Pita
2019-10-14 16:52 ` Eli Zaretskii
2019-10-14 19:59 ` Carlos Pita
2019-10-14 23:42 ` Carlos Pita
2019-10-14 23:49 ` Carlos Pita
2019-10-15 1:50 ` Carlos Pita
2019-10-15 9:30 ` Eli Zaretskii
2019-10-15 23:01 ` Carlos Pita
2019-10-16 4:25 ` Carlos Pita
2019-10-16 9:16 ` martin rudalics
2019-10-16 16:31 ` Carlos Pita
2019-10-16 16:40 ` Carlos Pita
2019-10-16 19:01 ` Carlos Pita
2019-10-17 8:13 ` Robert Pluim
2019-10-15 9:27 ` Eli Zaretskii
2019-10-20 16:03 ` Juri Linkov
2019-10-20 17:37 ` Carlos Pita
2019-10-20 18:52 ` Juri Linkov
2019-10-20 19:17 ` Carlos Pita
2019-10-24 17:09 ` Carlos Pita
2019-10-26 10:45 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAELgYhdkeW8P-4=RG=g3QL3Akh89Cu+WaAPrAEKavDhEQ+_dYw@mail.gmail.com' \
--to=carlosjosepita@gmail.com \
--cc=37689@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).