|
|
Chromium Code Reviews|
Created:
3 years, 6 months ago by Tom Anderson Modified:
3 years, 6 months ago CC:
chromium-reviews, oshima Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionRespect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor
This CL is a followup to [1] which used 'gdk-window-scaling-factor'
and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially
avoided using the GdkScreen API for this since the required functions
were added in version 3.9.10, and opted to get the settings directly.
This doesn't work all the time though, because GTK allows overriding
these settings with the GDK_SCALE and GDK_DPI_SCALE environment
variables (but only when using the X11 backend).
This CL makes the change to use those functions, at the cost of
bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro
we support, Trusty, has 3.10.8).
As a bonus, GdkScreen has a separate scale factor per monitor, so we
can finally stop using the global scale factor for all monitors.
[1] https://codereview.chromium.org/2899943002/
BUG=730757, 732440
R=erg@chromium.org,thestig@chromium.org
CC=oshima@chromium.org
Review-Url: https://codereview.chromium.org/2937623006
Cr-Commit-Position: refs/heads/master@{#480167}
Committed: https://chromium.googlesource.com/chromium/src/+/b50cab37a165f1f11d9a046d7f3367e4a563a73f
Patch Set 1 #Patch Set 2 : update expected deps #
Total comments: 4
Patch Set 3 : simplify #Messages
Total messages: 24 (15 generated)
Patchset #1 (id:1) has been deleted
The CQ bit was checked by thomasanderson@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor BUG=730757 R=erg@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). [1] https://codereview.chromium.org/2899943002/ BUG=730757 R=erg@chromium.org ==========
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). [1] https://codereview.chromium.org/2899943002/ BUG=730757 R=erg@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). [1] https://codereview.chromium.org/2899943002/ BUG=730757 R=erg@chromium.org,thestig@chromium.org ==========
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). [1] https://codereview.chromium.org/2899943002/ BUG=730757 R=erg@chromium.org,thestig@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org ==========
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org ==========
thomasanderson@chromium.org changed reviewers: + thestig@chromium.org
erg ptal. why does dpi have to be so hard :( +thestig for deps changes
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org CC=oshima@chromium.org ==========
deps update lgtm https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtkui/gtk_ui.cc (left): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... chrome/browser/ui/libgtkui/gtk_ui.cc:342: g_object_get(gtk_settings, "gtk-xft-dpi", >k_dpi, nullptr); Does the gdk APIs take gtk-xft-dpi into account somehow? Or is this no longer relevant? https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... chrome/browser/ui/libgtkui/gtk_ui.cc:324: resolution = kDefaultDPI; Just return |scale| here?
https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtkui/gtk_ui.cc (left): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... chrome/browser/ui/libgtkui/gtk_ui.cc:342: g_object_get(gtk_settings, "gtk-xft-dpi", >k_dpi, nullptr); On 2017/06/16 00:53:13, Lei Zhang wrote: > Does the gdk APIs take gtk-xft-dpi into account somehow? Or is this no longer > relevant? I think now it uses a combo of gdk-window-scaling-factor and gdk-unscaled-dpi. gtk-xft-dpi is pretty much unused. https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... File chrome/browser/ui/libgtkui/gtk_ui.cc (right): https://codereview.chromium.org/2937623006/diff/40001/chrome/browser/ui/libgt... chrome/browser/ui/libgtkui/gtk_ui.cc:324: resolution = kDefaultDPI; On 2017/06/16 00:53:13, Lei Zhang wrote: > Just return |scale| here? Done.
owners lgtm (but once again, i know nothing about dpi...)
The CQ bit was checked by thomasanderson@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from thestig@chromium.org Link to the patchset: https://codereview.chromium.org/2937623006/#ps60001 (title: "simplify")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 60001, "attempt_start_ts": 1497643433006900,
"parent_rev": "473bc6358908c1b39ef6adba839b9173f8540c1a", "commit_rev":
"b50cab37a165f1f11d9a046d7f3367e4a563a73f"}
Message was sent while issue was closed.
Description was changed from ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org CC=oshima@chromium.org ========== to ========== Respect GDK_SCALE and GDK_DPI_SCALE when calculating scale factor This CL is a followup to [1] which used 'gdk-window-scaling-factor' and 'gdk-unscaled-dpi' to calculate the scaling factor. I intentially avoided using the GdkScreen API for this since the required functions were added in version 3.9.10, and opted to get the settings directly. This doesn't work all the time though, because GTK allows overriding these settings with the GDK_SCALE and GDK_DPI_SCALE environment variables (but only when using the X11 backend). This CL makes the change to use those functions, at the cost of bumping the required GTK dep from 3.3.16 to 3.9.10 (the oldest distro we support, Trusty, has 3.10.8). As a bonus, GdkScreen has a separate scale factor per monitor, so we can finally stop using the global scale factor for all monitors. [1] https://codereview.chromium.org/2899943002/ BUG=730757,732440 R=erg@chromium.org,thestig@chromium.org CC=oshima@chromium.org Review-Url: https://codereview.chromium.org/2937623006 Cr-Commit-Position: refs/heads/master@{#480167} Committed: https://chromium.googlesource.com/chromium/src/+/b50cab37a165f1f11d9a046d7f33... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:60001) as https://chromium.googlesource.com/chromium/src/+/b50cab37a165f1f11d9a046d7f33...
Message was sent while issue was closed.
Hey, where did the deps changes go in the latest patch set? Tree's red now.
Message was sent while issue was closed.
https://codereview.chromium.org/2944703003
Message was sent while issue was closed.
On 2017/06/16 22:03:42, Lei Zhang wrote: > https://codereview.chromium.org/2944703003 oops. don't know how that got removed. thanks for the cl! |
