FrankBijnen / ExifToolGui

A GUI for ExifTool
GNU General Public License v3.0
351 stars 18 forks source link

Window opens very small on Win11 with x64 build #202

Closed CodeMarc11 closed 10 months ago

CodeMarc11 commented 10 months ago

When I launch ExifToolGUI on my Windows 11 laptop, the window opens at a small size every time. ExifToolGui start

This is on Win11 x64 with all latest updates. I created a new folder C:\Tools\ExifToolGUI and put ExifToolGUI_X64.exe v6.2.6 in it (renamed to ExifToolGUI.exe). Also put corresponding .map file, current exiftool.exe, WebView2Loader.dll. I have the old ExifToolGUI on my machine as well, in a separate folder. In case it matters, my display is 2560x1600 with 150% scaling through Windows display settings.

It happens whether I launch ExifToolGUI as Administrator or not, I rebooted and it still happens.

Here's the window at its normal size before I quit: ExifToolGui normal

After it opens with the tiny window, resizing it larger behaves weirdly. I click & drag on the corner, but the window does not adjust. I have to drag the cursor a ways out, then after a few seconds the window will snap to a specific width (not where my cursor is) and to the height where my cursor is. I think the horizontal size is the minimum width normally allowed. Here's a shot of the window after it snaps larger: ExifToolGui resize

And thanks for updating and porting ExifToolGUI!

FrankBijnen commented 10 months ago

@CodeMarc11 Hello CodeMarc11,

Thanks for your feedback. I really appreciate it.

I'm planning to release V6.2.7 very soon. This version will include fixes for Scaling and resizing. https://github.com/FrankBijnen/ExifToolGui/issues/199 I'm not convinced that that version will solve your issue, but it's worth testing it again with that version. You could:

Frank

CodeMarc11 commented 10 months ago

I took a shot at building it. I installed Delphi Community Edition and downloaded the Development branch code. Opening the project (ExifToolGUI.dproj) gave errors for FMain: TShellTreeView and TChart. Then the IDE gave an error saying it could not find MetropolisUIBlack.vsf. I have programming experience but have never used the Delphi IDE before.

When I tried to build Windows 64-bit, first the IDE gave errors for Field FMain.ShellTree, ShellList, ETChart, Series1. I clicked "No" to remove declaration for each. Then I got 6 build errors: [BRCC32 Error] ExifToolGUI.vrc(95): file not found: C:\Users\Public\Documents\Embarcadero\Studio\22.0\Styles\MetropolisUIBlack.vsf Same thing for MetropolisUIBlue, MetropolisUIDark, MetropolisUIGreen, Blue, Green. The first four have .style files at that location but no .vsf. I got as far as finding out that's related to "Metropolis UI" style/template, but haven't had luck finding how to get those missing .vsf files. So stuck at the build errors.

Can you point me to how to add the component I'm missing?

FrankBijnen commented 10 months ago

@CodeMarc11

Very nice that you took a shot. Here some pointers:

FrankBijnen commented 10 months ago

Update on the Metropolis styles. Very likely they come from a previous Rad installation. Just untick them as described in my previous post.

CodeMarc11 commented 10 months ago

I think it might be better to just get a test build from you. You mentioned WeTransfer. Can you share a link to a Windows x64 exe (and map?) from the Development branch for me to test?

FrankBijnen commented 10 months ago

I commited the 64 bit executable and map to development. https://github.com/FrankBijnen/ExifToolGui/tree/Development/Source/Win64/Release The about form shows: V6.2.7.0 Pre (Pre for Pre-Release)

Should you still have problems with the window size please try the commandline parameters as described in: https://github.com/FrankBijnen/ExifToolGui/blob/Development/Docs/Readme%204K%20monitor.txt Definitely try this combination: /highdpi=unaware /scale

I will release 6.2.7 within a couple of days, when I do I will delete this executable.

Frank

CodeMarc11 commented 10 months ago

Hey, so it turns out my high-DPI display was just what you needed! (Kinda-3K instead of 4K.) Difficult to test when you need special hardware. Glad I could help. :)

"/highdpi=unaware /scale" was the solution on my scaled display. I pulled down the Dev repo with the exe and ran it. Here's screenshots so you can see the effects (as before, these are 1.5x size thanks to my Windows display scaling 150%). The initial tiny window was fixed immediately, without any parameters.

Just launching with no arguments, fonts were too small on my screen (i.e. not scaled): ExifToolGUI Dev build

With just "/scale", fonts were correctly scaled but window components were crunched: ExifToolGUI with scale

With both parameters "/highdpi=unaware /scale", initially the window came up huge and went way off my screen. Once I moved & resized it, and adjusted the elements, voila! ExifToolGUI with unaware, scale window adjusted

Quitting and launching again opened the window correctly, remembering its size & position.

I throw this on the "request" pile: to limit the window position/size at open so that it does not display offscreen, or run off the screen. Not for this (since the initial huge size was due to the DPI awareness change), but useful in case someone changes resolution or switches monitors. Not a high priority at any rate.

Thanks for your dedication!

CodeMarc11 commented 10 months ago

Oh, just for completeness, here's the window with only "/highdpi=unaware" (no /scale). It looks the same for me as with both parameters, though I wouldn't know if it's bad some other way. ExifToolGUI with unaware

FrankBijnen commented 10 months ago

@CodeMarc11

First of all: Thanks a million for taking the time to test this! As you say: Hard for me to test without the hardware.

My remarks/conclusions (not necessarily in a logical order) :

Frank folderlist folderprefs

FrankBijnen commented 10 months ago

With just "/scale", fonts were correctly scaled but window components were crunched:

Also fixed this. On a few places I used MulDiv(x, Screen.PixelsPerInch, GetDesignDpi) replaced by MulDiv(x, GetDesignDpi, Screen.PixelsPerInch) (Multiplicand and Divisor swapped)

Edit: And later found the standard method: ScaleValue.

Thanks again for reporting, Frank

CodeMarc11 commented 10 months ago

I removed the prerel. exe from Github, can only confuse other people.

Totally. It was a good way to temporarily make an exe available so I could test it. I might take another crack at building it locally when I have time, using your previous suggestions.

I'm a car enthusiast. I wish I could have a collection! Several of them are cars I've owned over the years, but the exotics are just pics to enjoy. Are you an enthusiast too?

Thanks for the mention of options. I hadn't actually dug around in Preferences before. It's nice that you've put GUI preferences/options for some things we had to specify as parameters to ExifTool direct before.

Request for future release: Could showing BreadCrumBar be split out to a separate checkbox from showing folders (-Filelist)? I added an "issue" for it, didn't see a way to create a "request". https://github.com/FrankBijnen/ExifToolGui/issues/204 I'm not sure what you meant by "scaling" of the BreadcrumBar.

I'm still not sure that I've chosen the best defaults for HighDpi and Scaling to use for the program

I'd be happy to help test that, especially if I get ExifToolGUI building locally so you don't have to put executables in the branch. It looks like the project is Pascal; my experience is with C++, and new to Delphi though. Is there a way to PM you through GitHub? (I haven't found it.) Although as you noted, my display isn't 4k. It's an 18" 2560 x 1600 display on an Alienware m18 laptop running Win11 with 150% display scaling. In case you're not testing on Windows 11: Win11 changed the display scaling control from Win10. It looks like Win11 combines several things into one selection. Win11 display scaling When I click into "Scale" it shows multiple things that seems to apply to... and discourages touching them! Win11 custom scaling

If it helps, I tried '/HighDpi=PerMonitorAwareV2' (No Scale) (with same test build) and the results were the same as with no command line parameters. A too-small window with correct elements, everything proportionally smaller, including fonts. Window PerMonitorAwareV2 Seems as if that setting is just ignoring Windows display scaling, not using it per monitor (as the name implies).

What parameters do you recommend for v6.2.7 x64 Windows, when it's ready? Or will it not need any parameters?

FrankBijnen commented 10 months ago

Car enthusiast? To be honoust I'm a biker (Currently Honda VFR1200F, previous Honda Fireblade) But that doesn't mean I dont recognise a good looking car. As with the 4K monitor, it all comes down to money, or the lack of..

It would like to encourage you to build it yourself, and am willling to help. a PM would be helpful. You cant with Github. On the Exiftool Forum https://exiftool.org/forum/ my nickname is FrankB. You could send a PM there and exchange Email addressess? I dont like to disclose my Email address here.

/HighDpi=PerMonitorAwareV2/ Goes a few steps beyond SystemAware. For example when you drag a window from a primary to secondary monitor, it should dynamically resize/scale. But it would require some programming effort.

"What parameters do you recommend for v6.2.7 x64 Windows, when it's ready? Or will it not need any parameters?" Ideally no parameters, but thats the ideal world.

"It looks like the project is Pascal; my experience is with C++" The language Pascal was designed to teach programming, so if you've mastered C++ Pascal should be no problem. Usually the real problems come with the IDE. If I have to find something in Visual Studio it can take hours, in Delphi I know where it is.

FrankBijnen commented 10 months ago

Closed with V6.2.7

CodeMarc11 commented 10 months ago

Motorcycles are awesome! I rode for a few years. Just a "small" bike, a Kawasaki Ninja ZX-6. It blew me away how fast even that was. That Honda is pretty nice... the FireBlade looks like it was a monster! Ah, money... always the limiting factor.

I'll PM you from the exiftool forum, so we can exchange emails. I'm also avoiding putting either of our personal info here. Then I can ping you for help after I try building again.

Sounds like /HighDpi=PerMonitorAwareV2 is more than you need. Getting the app to open with correct usage of Windows display scaling is fine. More effort to dynamically rescale when moved between monitors with different display scaling is a bit much for something you're making for free.

I'll hopefully remember to try v6.2.7 without any parameters and see the result. ☺️

Haha, I actually learned Pascal in high school, so many years ago. No idea what the current iteration looks like. I'm right with you on IDEs - I have many years experience with Visual Studio, so run into the same thing from the other side.

FrankBijnen commented 10 months ago

Meanwhile released V6 2.7 See ya on exiftool.org