Skip to content
This repository was archived by the owner on Nov 18, 2018. It is now read-only.

Gtk and Qt applications are too large on a HiDPI screen [$25] #190

Closed
iBelieve opened this issue Mar 12, 2016 · 6 comments
Closed

Gtk and Qt applications are too large on a HiDPI screen [$25] #190

iBelieve opened this issue Mar 12, 2016 · 6 comments

Comments

@iBelieve
Copy link
Contributor

Running the simple greenisland shell on top of GNOME/X11:

workspace 1_008

The cursor drawn by GreenIsland is also too large.

There is a $25 open bounty on this issue. Add to the bounty at Bountysource.

@plfiorini
Copy link
Member

What does weston-info and qtdiag say?

@plfiorini plfiorini added this to the Version 0.8.0 milestone Mar 13, 2016
@plfiorini plfiorini self-assigned this Mar 13, 2016
@iBelieve
Copy link
Contributor Author

iBelieve commented Apr 7, 2016

Sorry for the late response. weston-info:

interface: 'wl_compositor', version: 3, name: 1
interface: 'wl_subcompositor', version: 1, name: 2
interface: 'wl_data_device_manager', version: 1, name: 3
interface: 'wl_shm', version: 1, name: 4
    formats: unknown(20203843) unknown(30335258) unknown(30335241) unknown(30334258) unknown(34324241) unknown(34324258) unknown(32315241) unknown(32315258) unknown(34324752) unknown(35315258) RGB565 ARGB8888 XRGB8888 XRGB8888 ARGB8888
interface: 'qt_hardware_integration', version: 1, name: 5
interface: 'wl_drm', version: 2, name: 6
interface: 'wl_seat', version: 4, name: 7
    name: (null)
    capabilities: pointer keyboard touch
    keyboard repeat rate: 40
    keyboard repeat delay: 400
interface: 'wl_output', version: 2, name: 8
    x: 0, y: 27, scale: 2,
    physical_width: 286 mm, physical_height: 179 mm,
    make: 'Green Island', model: 'eDP1',
    subpixel_orientation: none, output_transform: normal,
    mode:
        width: 1280 px, height: 773 px, refresh: 59 Hz,
        flags: current preferred
interface: 'wl_shell', version: 1, name: 9
interface: 'xdg_shell', version: 1, name: 10
interface: 'gtk_shell', version: 2, name: 11

qtdiag:

Qt 5.6.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 5.3.0) on "xcb" 
OS: Arch Linux [linux version 4.4.5-1-ARCH]

Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2

Environment:
  QML2_IMPORT_PATH="/home/mspencer/.local/lib/qt/qml/�:/home/mspencer/.local/lib/qt/qml/"
  QT_AUTO_SCREEN_SCALE_FACTOR="1"

Features: QT_NO_EXCEPTIONS QT_NO_ZLIB

Library info:
  PrefixPath: /usr
  DocumentationPath: /usr/share/doc/qt
  HeadersPath: /usr/include/qt
  LibrariesPath: /usr/lib
  LibraryExecutablesPath: /usr/lib/qt/libexec
  BinariesPath: /usr/lib/qt/bin
  PluginsPath: /usr/lib/qt/plugins
  ImportsPath: /usr/lib/qt/imports
  Qml2ImportsPath: /usr/lib/qt/qml
  ArchDataPath: /usr/lib/qt
  DataPath: /usr/share/qt
  TranslationsPath: /usr/share/qt/translations
  ExamplesPath: /usr/share/doc/qt/examples
  TestsPath: /usr/tests
  SettingsPath: /etc/xdg

Standard paths [*...* denote writable entry]:
  DesktopLocation: "Desktop" */home/mspencer/Desktop*
  DocumentsLocation: "Documents" */home/mspencer/Documents*
  FontsLocation: "Fonts" */home/mspencer/.fonts*
  ApplicationsLocation: "Applications" */home/mspencer/.local/share/applications* /home/mspencer/.local/share/xdg-app/exports/share/applications /usr/var/xdg-app/exports/share/applications /usr/local/share/applications /usr/share/applications
  MusicLocation: "Music" */home/mspencer/Music*
  MoviesLocation: "Movies" */home/mspencer/Videos*
  PicturesLocation: "Pictures" */home/mspencer/Pictures*
  TempLocation: "Temporary Directory" */tmp*
  HomeLocation: "Home" */home/mspencer*
  AppLocalDataLocation: "Application Data" */home/mspencer/.local/share/QtProject/qtdiag* /home/mspencer/.local/share/xdg-app/exports/share/QtProject/qtdiag /usr/var/xdg-app/exports/share/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag
  CacheLocation: "Cache" */home/mspencer/.cache/QtProject/qtdiag*
  GenericDataLocation: "Shared Data" */home/mspencer/.local/share* /home/mspencer/.local/share/xdg-app/exports/share /usr/var/xdg-app/exports/share /usr/local/share /usr/share
  RuntimeLocation: "Runtime" */run/user/1000*
  ConfigLocation: "Configuration" */home/mspencer/.config* /etc/xdg
  DownloadLocation: "Download" */home/mspencer/Downloads*
  GenericCacheLocation: "Shared Cache" */home/mspencer/.cache*
  GenericConfigLocation: "Shared Configuration" */home/mspencer/.config* /etc/xdg
  AppDataLocation: "Application Data" */home/mspencer/.local/share/QtProject/qtdiag* /home/mspencer/.local/share/xdg-app/exports/share/QtProject/qtdiag /usr/var/xdg-app/exports/share/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag
  AppConfigLocation: "Application Configuration" */home/mspencer/.config/QtProject/qtdiag* /etc/xdg/QtProject/qtdiag

File selectors (increasing order of precedence):
  en_US unix linux arch

Network:
  Using "OpenSSL 1.0.2g  1 Mar 2016", version: 0x1000207f

Platform capabilities: ThreadedPixmaps OpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface SwitchableWidgetComposition

Style hints:
  mouseDoubleClickInterval: 400
  mousePressAndHoldInterval: 800
  startDragDistance: 19
  startDragTime: 500
  startDragVelocity: 0
  keyboardInputInterval: 400
  keyboardAutoRepeatRate: 30
  cursorFlashTime: 1000
  showIsFullScreen: 0
  showIsMaximized: 0
  passwordMaskDelay: 0
  passwordMaskCharacter: U+2022
  fontSmoothingGamma: 1
  useRtlExtensions: 0
  setFocusOnTouchRelease: 0
  tabFocusBehavior: Qt::TabFocusBehavior(TabFocusAllControls) 
  singleClickActivation: 0

Additional style hints (QPlatformIntegration):
  ReplayMousePressOutsidePopup: 0

Theme:
  Available    : gtk2,gnome,generic
  Styles       : GTK+,fusion,windows
  Icon theme   : Paper, gnome from /home/mspencer/.icons,/home/mspencer/.local/share/xdg-app/exports/share/icons,/usr/share/icons,/usr/share/pixmaps

  System font  : "Cantarell" 11
  Native file dialog
  Native color dialog
  Native font dialog

Fonts:
  General font : "Cantarell" 11
  Fixed font   : "monospace" 11
  Title font   : "DejaVu Sans" 12
  Smallest font: "DejaVu Sans" 12

Screens: 1, High DPI scaling: active
# 0 "eDP1" Depth: 24 Primary: yes
  Geometry: 1280x800+0+0 (native: 2560x1600+0+0) Available: 1280x773+0+27
  Physical size: 286x179 mm  Refresh: 59 Hz Power state: 0
  Physical DPI: 113.678,113.52 Logical DPI: 96,96 (native: 192,192) Subpixel_None
  High DPI scaling factor: 2 DevicePixelRatio: 2 Pixel density: 2
  Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0

LibGL Vendor: Intel Open Source Technology Center
Renderer: Mesa DRI Intel(R) Haswell 
Version: 3.0 Mesa 11.1.2
Shading language: 1.30
Format: Version: 3.0 Profile: 0 Swap behavior: 0 Buffer size (RGB): 8,8,8

This is with QT_AUTO_SCREEN_SCALE_FACTOR=1. Without that, everything is too small.

@plfiorini plfiorini changed the title Gtk and Qt applications are too large on a HiDPI screen Gtk and Qt applications are too large on a HiDPI screen [$25] Apr 7, 2016
@iBelieve
Copy link
Contributor Author

@plfiorini Any idea when you'll be able to fix this?

@plfiorini
Copy link
Member

Wayland clients are scaled by 2 for sure because the compositor reports scale 2 passed from the underlying windowing system (X11).

Not sure if XOrg then rescale the Green Island window by 2 making everything big.

@plfiorini plfiorini modified the milestones: Version 0.9.0, Version 0.8.0 Apr 27, 2016
@plfiorini plfiorini added the bug label Aug 3, 2016
@plfiorini
Copy link
Member

Looks like there's a bug in how QtWaylandCompositor manages quick surface size.
I have a patch that fixes the size but it doesn't fix coordinates yet.

plfiorini added a commit that referenced this issue Aug 14, 2016
As reported here [1] with a compositor that properly
handles HiDPI, surface item size is not scaled at all
resulting in windows twice the size on Retina.

Issue: #190
Issue: #218

[1] = https://bugreports.qt.io/browse/QTBUG-55303
@plfiorini
Copy link
Member

Fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants