Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DPI Scaling not respected on multiple monitors with different DPI settings #378

Closed
mwidmann opened this issue Oct 30, 2018 · 24 comments

Comments

Projects
None yet
7 participants
@mwidmann
Copy link

commented Oct 30, 2018

Steps to reproduce this issue

My Setup ist the following: Surface Book 2, 3000x2000 (200% scaling, main display) conntected to a Dell U2711, 2560x1440 (100% scaling, secondary display)

  1. Open HeidiSQL
  2. move window from main display to secondary display.
  3. everything, besides the title and menu bar is displayed at the scaling of the main display.
    heidisql_2018-10-30_11-30-45

Current behavior

The contents of the application are scaled using the dpi scaling of the main display.

Expected behavior

The contents of the application are scaled according to the dpi scaling of the display, the window is displayed on.

Possible solution

It must be a bug introduced in either the last version or the version before that. It worked with no problems until I updated yesterday.

Environment

  • HeidiSQL version: Revision 5315 (yours: 5315)
    Compiled: 2018-10-29 (yours: 2018-10-30)

  • Operating system: Windows 10, Version 1809 (OS Build 17763.55)

@mwidmann

This comment has been minimized.

Copy link
Author

commented Oct 31, 2018

I have to correct myself. The issue with the incorrect scaling is present even on the main display. While Titlebar and Toolbar are scaled correctly on the secondary display they are way to small on the primaray display at 200%.

chrome_2018-10-31_08-18-31

I updated HeidiSQL to 9.5.0.5317 this morning.

edit: changed the screenshot for better comparison. The browser window behind is not zoomed, looking sharp and correct. Screenshot has been taken on the primary screen at 200% scaling.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 31, 2018

I am currently working on high-dpi awareness, which is not yet fully supported. See #213 . So it's quite explainable that switching from one monitor to the other has issues. For the moment I would be happy to have it all correctly zoomed on one monitor with one scale percentage. As this is all quite complex stuff and partly not supported by Delphi, I am not sure if I can fix this monitor switch issue at all. But we'll see.

@mwidmann

This comment has been minimized.

Copy link
Author

commented Oct 31, 2018

Thank you for answering. As I said it worked quite fine until a couple of days ago with the setup I have.

Even when running only with the HI-DPI Display with no external display attached, I have buttons cut off and the title and toolbar being displayed too small.

heidisql_2018-10-31_09-25-16

These are the settings:

applicationframehost_2018-10-31_09-26-06

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Oct 31, 2018

The buttons are cut because their width is auto-calculated by the (too small) width of the session tree. Make it wider and the buttons are ok.

The title bar should be higher, yes. But that should go in ticket #213 .

Before I committed these changes, Windows just zoomed HeidiSQL up to your wanted scaling, which made it look very blurry. That's what #213 is all about.

@mwidmann

This comment has been minimized.

Copy link
Author

commented Oct 31, 2018

Thanks for the explanation. In this case let's close this one and continue in #213

@mwidmann mwidmann closed this Oct 31, 2018

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Nov 4, 2018

Let's keep this one open, as it's a more special issue which I want to solve separately from the other high-dpi glitches.

@SlyDave

This comment has been minimized.

Copy link

commented Jan 7, 2019

I'm also experiencing this issue, so here is another data point:

OS: Windows 64bit Pro

Primary Monitor: 3840 x 2160 (4k) with scaling set to 250%
image

Secondary: 2560 x 1440 (WQHD) with scaling set to 100%
image

@Saibamen

This comment has been minimized.

Copy link

commented Jan 10, 2019

Similar: #479

@ansgarbecker ansgarbecker added this to the v10.1 milestone Jan 10, 2019

@JGJP

This comment has been minimized.

Copy link

commented Jan 22, 2019

The weird thing about this is that on the official version 9.5.0.5196 it looks fine. It's only after upgrading to the latest build that I get this scaling issue

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Jan 22, 2019

The weird thing about this is that on the official version 9.5.0.5196 it looks fine

No, it looks blurry in that version. Correctly scaled sizes, but blurry. That's what Windows does for you. In the newer builds, HeidiSQL tells Windows "I am DPI aware, don't upscale me, I'm gonna do this myself in a better way". This is quite complex to solve for me as you can see in the list of issues with label "high-dpi".

@JGJP

This comment has been minimized.

Copy link

commented Jan 23, 2019

Maybe there can be a setting in Preferences to make it DPI-aware or not? Because I mainly use HeidiSQL on my lower DPI monitors and it looks perfectly fine. Actually it looks fine on my Surface Pro monitor also, because it packs the pixels into half the space

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Jan 23, 2019

If you mainly look at a low-dpi monitor then this scaling should not happen, and the issue should not affect you, does it?

@JGJP

This comment has been minimized.

Copy link

commented Jan 24, 2019

It affects me because I am running the low DPI monitors from my surface, which is high DPI. Anyway I noticed that you just published a new version, and this one looks fine on my low DPI monitors. Thanks!

@mwidmann

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

Which version have you tried @JGJP ? I checked out v10 released yesterday and it looks like this on my external display.
heidisql_9gh0u0cluc

@slaFFik

This comment has been minimized.

Copy link

commented Jan 27, 2019

I've downgraded to v9.5, which is totally fine regardless of the monitor it's opened on.
v10.1 looked awful on my ~4K (main but additional external monitor) and QHD+ (as a secondary on Dell XPS 13"). Not preserving correctly columns width, squashing everything. Too small text in tables/table view.
My display settings (were set by Windows as defaults, I've not changed them):
QHD+: scale 250%, 3200x1800px.
~4K: scale 175%, 3840x2160px

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Jan 27, 2019

v9.5 looks blurry with high DPI settings - this was discussed in #213. It may look ok enough for some people, but this is just a backward compatibility logic from Microsoft. The right way to go is the complex one - scale every component separately, to make them look sharp. Though that's really hard work, and v10.1 is the first version with support for that, so please have a bit of patience here.

@JGJP

This comment has been minimized.

Copy link

commented Jan 28, 2019

@mwidmann yes it was that version.
I figured out though that if one of my low-DPI monitors is set as the main monitor then it looks fine on the low-DPI monitors. It gets messed up when my high-DPI monitor is set as main

@mwidmann

This comment has been minimized.

Copy link
Author

commented Jan 28, 2019

@JGJP yes, this is a situation that makes me furious. It's been years (an two major Windows versions) that Hi-DPI Laptops have been attached to lower DPI external monitors and Microsoft still hasn't found a way to handle this. Because it's not just the work of the app developers that needs to address this. I have windows opening outside of the screen bounds, I have system dialogs show in 200% on the 100% display, I have window snapping spanning the App over both screens and so on. This used to be so painless when I still was using MacOS. And they figured out how to make this stuff work years ago. 😤

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Jan 28, 2019

I'm sure these new Windows Metro apps don't have such issues. HeidiSQL is just an old-style app :)

@JGJP

This comment has been minimized.

Copy link

commented Jan 29, 2019

@mwidmann I agree, it's a total pain, getting off-topic though :^)

@tothandor

This comment has been minimized.

Copy link

commented May 21, 2019

Same for me. If I move the main window between primary (DPI 125%) and secondary (DPI 100%) screens, then toolbar icons are getting larger, and larger until it becomes useless.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented May 30, 2019

@tothandor that is issue #446 , for which I still don't have a solution. Also I suppose the Delphi library needs more fixes for these dpi issues.

@ansgarbecker ansgarbecker removed this from the v10.2 milestone Jun 7, 2019

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

commented Jul 18, 2019

c31cae2 now removes all tweaks for high DPI monitors. I'm giving up here, this does all not work good enough, even different computers and Windows versions behave differently. It's a mess. So, now HeidiSQL is zoomed by Windows again, like it was in earlier v9.5. This does at least display all controls and fonts in the right dimensions.

@JGJP

This comment has been minimized.

Copy link

commented Jul 19, 2019

@ansgarbecker thanks for looking into this, appreciate that it's kind of an edge case and very difficult to deal with. FWIW it also seems that it's affected by whether external displays were connected or not when the computer is booted up. Anyway, even the version I'm running now is workable, so not an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.