Questions tagged [hidpi]
76 questions
2
votes
2 answers
How to render each pixel of a bitmap texture to each native physical pixel of the screen on macOS?
As modern macOS devices choose to use a scaled HiDPI resolution by default, bitmap images get blurred on screen. Is there a way to render a bitmap pixel by pixel to the true native physical pixels of the display screen? Any CoreGraphics, OpenGL,…

jxy
- 784
- 7
- 16
2
votes
1 answer
How do I handle multi-resolution images for various levels of HiDPI scaling in JavaFX?
There are many scaling factors out there for HiDPI screens (1.25x, 1.5x, 2x, 3x, etc). The most straight-forward solution would be to provide multiple versions of the same image in JavaFX, which seems to be possible in Swing using things like…
user3838784
2
votes
0 answers
PyQt: High CPU usage on HiDPI
The code below is a simple Python code with PyQt5 to display a GIF. I have two monitors, one is an imac 5k, and the other one is a QHD monitor. It is difficult to understand the CPU usage difference between the situations that run the Python file on…

Fred kim
- 21
- 2
2
votes
2 answers
How to find real display density (DPI) from Java code?
I'm going to do some low-level rendering stuff, but I need to know real display DPI for making everything of correct size.
I've found one way to do this:
java.awt.Toolkit.getDefaultToolkit().getScreenResolution() — but it returns incorrect result on…

Display Name
- 8,022
- 3
- 31
- 66
2
votes
2 answers
Android Studio HiDPI support for Linux
I'm struggling with HiDPI support of Android Studio 2.1.3 for Linux Mint. What I know it should be possible to enable Android Studio's HiDPI support by adding -Dhidpi=true flag to /opt/android-studio/bin/studio64.vmoptions Unfortunately it doesn't…

tomrozb
- 25,773
- 31
- 101
- 122
1
vote
0 answers
Java Swing HiDPI solution for icons - SVG and runtime scaling with Batik? Precompiled PNGs?
I want to make the graphics (icons, logo etc.) of an existing Java Swing application look better on HiDPI displays with a scale factor larger than 1.0, e.g. my notebook with 14" display and Windows 10 (scale factor 1.5). At the moment, the…

MrSnrub
- 1,123
- 1
- 11
- 19
1
vote
1 answer
How can I find the scaling of the LAF for HIDPI displays?
When using a HiDPI aware LAF like "GTK" instead of "metal" then components get scaled. The isssue I am having, how can I scale a custom component the same.
Here is an example where clicking on the buttons switch the look and feel, you can see the…

matt
- 10,892
- 3
- 22
- 34
1
vote
0 answers
JComponent for images with no zoom for HiDPI
I'd like to have a component that shows an image in Java without zooming on HiDPI screens.
The obvious candidate is to use a JLabel. I've succesfully done it by overwriting the AffineTransform in paintComponent but it remains the problem that the…

Anthony
- 1,245
- 1
- 16
- 15
1
vote
0 answers
How to align window to windows' taskbar
I'm trying to position my Win32 API window alongside (e.g. left-sided vertical) taskbar. My display has 2560x1600 resolution and 144 DPI. I had some problems with DPI-aware apps previously, so maybe I still don't undestand some DPI-related things.…

qloq
- 689
- 1
- 5
- 15
1
vote
0 answers
How to detect that application is in gdi scaling mode
I use GetThreadDpiAwarenessContext and then AreDpiAwarenessContextsEqual to detect if an application is in gdi scaling mode:
AContext := GetThreadDpiAwarenessContext;
Result := AreDpiAwarenessContextsEqual(AContext,…

Chet Chet
- 11
- 3
1
vote
0 answers
EnableWindowsFormsHighDpiAutoResizing in MFC native app
MFC application with CLR support enabled (.net framework 4.7.2) that references a c# assembly that contains WinForms controls. These controls use Control.DeviceDpi but at runtime this api always returns 96.
Adding an MFCApplication.exe.config with…

ekt
- 129
- 2
- 11
1
vote
0 answers
What is the best value for Xft.dpi in .Xresources
From Arch Wiki:
For Xft.dpi, using integer multiples of 96 usually works best, e.g. 192 for 200% scaling.
I know that 200%, 300%,... scaling is the best possible because every pixel replaced with integer amount of pixels and we don't have…

superpupervlad
- 122
- 1
- 8
1
vote
0 answers
How do I trigger the WinForms DpiChanged event?
(No, I can't upgrade this codebase to .NET Core or newer yet.)
I have an app that's primarily Windows Forms, and partially WPF. When font size changes at runtime, WPF reacts correctly. Windows Forms, instead, doesn't even seem to realize anything…

Sören Kuklau
- 19,454
- 7
- 52
- 86
1
vote
1 answer
What exactly is modified by setting the GNOME display scale through GUI?
After setting the display scale to 200% through "GNOME Settings" (gnome-control-center display), I check scaling-factor through the command line:
$ gsettings get org.gnome.desktop.interface scaling-factor
uint32 1
As you can see, the scaling-factor…

SanXell
- 45
- 4
1
vote
1 answer
Using HidD_GetInputReport(..) to retrive XBOX ONEs button states
I am trying to talk to the XBOX ONE Controller via the Microsoft HID API without using XINPUT. I'm currently able to control all the rumble motors (including the force feedback triggers) by sending the packet using HidD_SetOutputReport(HANDLE,…

Ohjurot
- 47
- 9