CaPTk icon indicating copy to clipboard operation
CaPTk copied to clipboard

UI redraw bad on drag to lower-res window

Open eac-upenn opened this issue 4 years ago • 9 comments

My primary (internal) screen: 3840 x 2160 Secondary (external, HDMI) screen: 1920 x 1080

To Reproduce

Drag main window from primary to secondary screen. Everything redraws and resizes nicely on the new screen except:

  • Transparent area between top and left window hardware and content pane (I changed my background to that beach scene just so you could see that it was transparent :-) )

  • File name ("5") and view label ("Axial") do not rescale.

It looks like Captk has its display coordinates offset from the window coordinates? Because to click on one of the UI elements (for instance one of the File, Preprocessing, etc., tabs) it works to click where the element should be relative to the window frame, not where it displays.

The About screen also does this, the control palette does not.

Before and after drag:

image

image

CaPTk v.1.8.0.Beta

OS Name Microsoft Windows 10 Home Version 1903 OS Build 18362.959

System Manufacturer HP System Model HP Spectre x360 Convertible System Type x64-based PC Processor Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz, 2601 Mhz, 2 Core(s), 4 Logical Processor(s) BIOS Version/Date American Megatrends Inc. F.07, 14-Apr-16 SMBIOS Version 2.8 Embedded Controller Version 38.22 BIOS Mode UEFI

eac-upenn avatar Jul 31 '20 20:07 eac-upenn

Hi @eac-upenn, thank you for the report. I was not able to reproduce the transparent offset gap you demonstrated on my machine using one display of 1920x1080 and a second of 1280x1024. However I can confirm that the filename/view label fails to scale (or does so very oddly).

Out of curiosity, when exactly does the transparent area appear? For instance, if you slowly drag the CaPTk window into the lower-res display space, or move it so that half the window is on display 1 and half on display 2, does the gap appear halfway across the window? Does anything similar happen if the CaPTk window starts on the lower-res monitor and then you drag it to the higher-res one? (Dragging the window to display 2 and then closing + restarting the CaPTk GUI client may cause it to start on that display on the next run.)

Please keep us updated if you discover any more details or conditions under which this error occurs.

Also paging @ashishsingh18 @sarthakpati, can either of you replicate this? Might only occur on higher resolutions than my monitors support :smile:

AlexanderGetka-cbica avatar Aug 01 '20 06:08 AlexanderGetka-cbica

@eac-upenn Also, do you have any application scaling set up for either display? You can check under "Scale and layout" in the windows 10 display settings, just above the resolution.

AlexanderGetka-cbica avatar Aug 01 '20 06:08 AlexanderGetka-cbica

I haven't been able to reproduce this on my windows machine with one display of 1920 x 1080 and the other of 2560 x 1440 resolution.

ashishsingh18 avatar Aug 01 '20 14:08 ashishsingh18

@eac-upenn Also, do you have any application scaling set up for either display? You can check under "Scale and layout" in the windows 10 display settings, just above the resolution.

Good question! Internal (hi-res) monitor is at 300%, external at 100%.

Out of curiosity, when exactly does the transparent area appear?

CapTk behaves like other applications: as you drag a window to the external monitor, the part on the external monitor appears huge (because Windows is scaling the window at the same PPI as the internal monitor). After a certain point in the drag Windows decides the window is "really" on the external monitor, so it snaps to the correct size on the external monitor, and that's when the transparency appears.

eac-upenn avatar Aug 03 '20 12:08 eac-upenn

Aha! The problem isn't the drag. If I switch the external monitor to be my main monitor, then start Captk, the Captk window starts out (on the external monitor) with the offset and transparency (which go away when I drag the window to the internal monitor).

eac-upenn avatar Aug 03 '20 12:08 eac-upenn

If I change my internal screen application scaling to 100% (from 300%) (this is the part where you say Thank you Eric, for making your UI microscopic), then Captk starts up on the main screen with the transparency and offset.

eac-upenn avatar Aug 03 '20 14:08 eac-upenn

And, as final details, in Advanced scaling settings , "Fix scaling for apps" is off and I'm not using "Custom scaling".

eac-upenn avatar Aug 03 '20 14:08 eac-upenn

This is amazing, thank you so much for the detailed report, Eric! 😄

sarthakpati avatar Aug 03 '20 14:08 sarthakpati

I am still unable to replicate this issue with all the information shared. Tried different resolutions, scaling.

ashishsingh18 avatar Aug 04 '20 21:08 ashishsingh18