Skip to content

Conversation

@regs01
Copy link

@regs01 regs01 commented Jul 2, 2024

Added optional ability to save window position and/or dimensions.

Also improved Preferences form a bit. Everything is aligned now. And it's resizeable now, which is more convenient.

@JeromeMartinez
Copy link
Member

build with this PR.
@regs01 thank you for your proposal, it is very appreciated.
Unfortunately I face an issue when I open the preference windows, I have an empty display:
image
It is fine after I click on a page.
We use C++Builder 11 Community Edition.

@cjee21 is the change proposal about how to compute window sizes is fine at high DPIs?

PS: @regs01 please rebase, I just merged another PR and now it is conflicting, sorry about that, it is rare.

@JeromeMartinez JeromeMartinez requested a review from cjee21 July 2, 2024 08:03
@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

@cjee21 is the change proposal about how to compute window sizes is fine at high DPIs?

I'm new to VCL so I just work on improving the existing codes. If there is a better and more proper way from someone more experienced in VCL then we should use that. I will test it later. We need to test on Windows 7 (to ensure no issues like previously) too and ideally it should be tested by someone with a multi-monitor, multi-DPI system. The existing implementation was not tested on this kind of set-up either so I don't know how it handles that.

It seems now the default is to not remember window position and remember window size. We need to consider whether to keep old behaviour as default (set both defaults to not remember) or not.

Also remember to use spaces for indents (it looks like tabs now).

@JeromeMartinez
Copy link
Member

It seems now the default is to not remember window position and remember window size. We need to consider whether to keep old behaviour as default (set both defaults to not remember) or not.

I think it is a good intermediate.

Also remember to use spaces for indents (it looks like tabs now).

True. @regs01 please use spaces instead of tabs.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

Unfortunately I face an issue when I open the preference windows, I have an empty display

Yes it's blank unless click on one of the items in the tree. Also it is entirely white with no distinction between the left, right and bottom sections. I don't know if that's a good idea. Also is it intended that the main window is re-spawned every time Preferences is closed?

The issue reported by Klaus1189 is still there and now is triggered as soon as Preferences is opened. Seems to take very long to open Preferences too.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

@cjee21 is the change proposal about how to compute window sizes is fine at high DPIs?

With remember window size disabled it is acceptable for me on different DPIs but it is different size/ratio than what MediaInfo has been using for years so I don't know how others will react.

With remember window size enabled, if user changes DPI after using MediaInfo at least once, it uses size for old DPI and window is too small (or maybe large). This may also cause issues for people using multi-monitors with different DPIs (I don't know how the behaviour is here since I no longer have multi-monitors).

@JeromeMartinez
Copy link
Member

it is different size/ratio than what MediaInfo has been using for years so I don't know how others will react.

I am not shocked by the default and not so different so it is acceptable for me.

if user changes DPI after using MediaInfo at least once, it uses size for old DPI and window is too small (or maybe large).

@regs01 is it possible to save a kind of DPI independent ratio rather than a pixel size?

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

I am not shocked by the default and not so different so it is acceptable for me.

How default looks here:
Screenshot 2024-07-02 163338

Acceptable for me but no idea about other more particular users.

@JeromeMartinez
Copy link
Member

@cjee21 yours is not near from former version, ouch. too much height.

I have that:
image

Difference due to DPI somewhere?

@JeromeMartinez
Copy link
Member

@regs01 in practice we have 2 topics, the save window pos/dim on one side and the default size on another side. IMO it would be better to split the PR in 2: the first one keeps the same method for computing the default size. when it is merged, you send a PR with the changes you suggest about the default size.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

Difference due to DPI somewhere?

Not DPI. that's the default on 100% (96DPI). It is because I'm using higher resolution display with more screen estate (>=1440 height). Not sure if it'll be even longer at 4K. So if there is a particular user who does not like to remember window size, that user may not be happy with a big change in the percentage of screen estate that MediaInfo uses by default. It is useful for text/HTML view but if the user uses Basic most of the time, that user may see that as wasted white space (and also blocking stuff behind that the user may want to see to compare).

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

@JeromeMartinez Another major bug. When invoked from explorer context menu produces a window with no file open.

This change is causing lots of effects besides remember window size and change Preferences look.

  • Preferences taking long time to open (I have a fast PC, what will happen on older PCs?)
  • Main window re-spawning and flashing after Preferences closed (take longer and looks glitchy compared to the re-spawning we get when changing themes)
  • The open via command line / context menu issue

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

At least it does not seem to break Windows 7 compatibility.

Note: We can remove delay load from user32 if we no longer need to get DPI manually.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

We should set a minimum size if we allow resizing Preferences window:
Screenshot 2024-07-02 173200

and for main window too.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

Took a more detailed look at the changes in this PR.

I agree with changing the window size code to use VCL (Monitor and ScaleFactor) instead of the current one and remove all the native Windows API calls along with delay load of user32.

I also like that the window size/position saving is planned to be implemented as an option and that window position is disabled by default.

I think this should not be added:

    if (fpUnscaledMonitorHeight>=1440)
        Height=900;

as it is deemed "too much height" and may cause other users to complain although I can tolerate that

@cjee21 yours is not near from former version, ouch. too much height.

This should not be simply removed from FormShow without sufficient testing and other changes:

    //Refresh global
    FormResize(NULL);
    Refresh();

These two functions have been triggered by FormShow long before I started contributing. There is a reason why it is there.

@JeromeMartinez these are my opinions since you asked me for a review. As for the other changes, I am not so sure but think they require more testing and changes due to many side-effects/issues mentioned earlier. Of course, you make the decision on what is to be done (I'm just a user/contributor) :)

@JeromeMartinez
Copy link
Member

@JeromeMartinez these are my opinions since you asked me for a review.

Thanks :).

As for the other changes, I am not so sure but think they require more testing and changes due to many side-effects/issues mentioned earlier.

I guess that the best method here is to split this PR is 2 or more PRs with specific changes rather than all in one, too much difficult to review impacts.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 2, 2024

Maybe it is a good idea to make both window size and position saving disabled by default so that users used to existing behaviour will not be affected and especially with the DPI change causing unintended window size. That is why I try to keep the window size the same as before even on high-DPI displays after adding high-DPI support. Then users who want their own size can turn the setting on and resize the window to their liking and deal with resizing it again when changing DPI since the feature will be documented in changelog. If concerned about people not reading changelog and knowing the existence of the feature, maybe can make MediaInfo display changelog on first run after upgrade like what some apps do.

@regs01
Copy link
Author

regs01 commented Jul 2, 2024

Unfortunately I face an issue when I open the preference windows, I have an empty display:

I moved switching tab visibility before selecting active page.

@cjee21 is the change proposal about how to compute window sizes is fine at high DPIs?

I commented in the line computing Preferences form height. There is no need as VCL scales it automatically. It's enough to have fine looking height in design time. I see also new commits to chage lables height for Language and Output. There is also no need for that. They just needed to be aligned to baseline of comboboxes, as they were aligned to bottom of comboboxes. VCL take control of scaling.

We use C++Builder 11 Community Edition.

Yeah, I used C++ Builder 11.3 Community Edition. On VirtualBox, so it wouldn't mess up with old lifetime Delphi 10.2 Starter license. Although i'm using Lazarus now. But I must say how bad C++ Builder code completion is. It's so slow and buggy. Delphi's one is a little better. Even CnPack can't help much of situation. But Lazarus is completely different level - works instantly and only showing items within the scope. It just doesn't have prediction, as Visual Studio, but in everything else Lazarus code completion is even better than VS.

True. @regs01 please use spaces instead of tabs.

I always use spaces, although RAD Studio seem to default tabs. There could be few, before I changed it. Probably CnPack also does it, i'll look up on it.

Maybe it is a good idea to make both window size and position saving disabled by default so that users used to existing behaviour will not be affected and especially with the DPI change causing unintended window size. That is why I try to keep the window size the same as before even on high-DPI displays after adding high-DPI support. Then users who want their own size can turn the setting on and resize the window to their liking and deal with resizing it again when changing DPI since the feature will be documented in changelog. If concerned about people not reading changelog and knowing the existence of the feature, maybe can make MediaInfo display changelog on first run after upgrade like what some apps do.

I have 4K with 150% myself. It's just uncommon if users want to change scale factor on a daily basis. It is also highly unlikely that a person with high DPI display would use Windows 7. I left Position off by default, as this could be matter of preference. But with dimensions users wouldn't notice difference, as they will keep having default size and location. But those using Text, Tree views and similar will be able to quickly address form height issue without going into Settings.

@regs01 please rebase, I just merged another PR and now it is conflicting, sorry about that, it is rare.

I'll look up on rebase.

We should set a minimum size if we allow resizing Preferences window:

I did for Height, as i didn't do scroll box. I can do for Width. It's 1-second operation.

as it is deemed "too much height" and may cause other users to complain although I can tolerate that

#203
There is no too much on large screen, like I have. Especially when you use Text/Tree views. I think most large screen owners will appreciate this, although I can remove it, considering Dimensions are saved on by default. So those using Text/Tree wound just be able to resize themselves.

This should not be simply removed from FormShow without sufficient testing and other changes:

Cut off little bit less. I'll readd it. Although as I see at FormResize now, there is no need in most of it. All controls just need to be properly aligned.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 3, 2024

One more thing. If MediaInfo is closed while maximized, the next time it will start un-maximized but filling up the entire screen. This is not a problem for me and I have seen other apps behave like this but other users may find it annoying. I suggest if possible and not too difficult, make it remember if it is maximized or not and also the window dimensions saved should be for un-maximized so that user can restore their original un-maximized size.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 3, 2024

is it possible to save a kind of DPI independent ratio rather than a pixel size?

We can save the window size at 96DPI and scale it accordingly when we read/write the value. That should work. It may be rare for a user to change DPI but what if there are people who use laptop and dock it on a monitor with a different DPI every day?

@JeromeMartinez
Copy link
Member

dev snapshot.

A lot better but it is still slower, as if something is called too many times (the language files maybe?).
the "new version available" test is also there but I guess it is a sidecar bug due to dynamic update of the interface without the right settings.

he dark mode is fine but in light mode it is super flat, some separation lines disappeared:
image

This PR has too many topics in one shot, it would still be better to split it in several PRs, one per topic, e.g. a first PR could be a resizable pref window and only that, and we merge it after validation then do a next step e.g. save window preferences without touching the algorithm for the default size then touching the algorithm for the default size.

@cjee21
Copy link
Collaborator

cjee21 commented Jul 3, 2024

dev snapshot.

Confirmed that invoking from CLI/context menu is still broken as I expected earlier after a quick look at the codes.

@JeromeMartinez I don't feel like reviewing this anymore

  1. The indents are not fixed as desired by you even though this is the easiest thing

  2. The complexity of the commits has increased instead of becoming clearer as you asked for and it was merged instead of rebased?

  3. This PR has too many topics in one shot, it would still be better to split it in several PRs

    Topics that are actually in this PR:

    1. Changing native Windows APIs to VCL APIs for DPI
    2. Adding new default window height for >1440p
    3. Implementing remember window position/size and the option
    4. Redesigning look of Prefs window
    5. Unknown changes that broke CLI invocation and caused main window to refresh on Preferences closed
  4. I said to not remove FormResize and Refresh from FormShow to prevent breaking things. It was re-added but now FormShow is removed? So still broken and high risk of other things breaking that are yet to be discovered.

  5. I do not get why it is required to redesign Preferences window

    • The existing one is perfectly serving it's purpose
    • The new all-white design without separation does not match with the rest of MediaInfo or other Windows apps
    • I don't see any benefit of being able to resize it, it's just all white space
    • It is now slower to open even noticeable on a 5GHz 1-year-old CPU (will it take ages for users on old PCs?)
    • The fix we added recently for aligning the buttons' heights on high DPI as requested by Klaus1189 has been undone:
      Screenshot 2024-07-03 221812
  6. All these make me can't help but question if it was sufficiently tested and if there is a clear understanding of how the existing codes work before attempting change.

  7. I suggest getting Klaus1189 to check the Preferences window instead of me since he appears to care about this window way more than me and to a pixel level. I only see this window once every update so I don't really care what happens here as long as can be used to change settings when required.

@regs01
Copy link
Author

regs01 commented Jul 3, 2024

A lot better but it is still slower, as if something is called too many times (the language files maybe?).

You mean, when switching tabs? That's because ComboBoxes are filled every time tab is switched. I didn't touch it. It's an old behavior. A better option would be to fill them once at form creation. And when a language is added.

@regs01
Copy link
Author

regs01 commented Jul 4, 2024

Moving ComboBox_Update to FormCreate. And it was already in Language_NewClick and Language_DeleteClick. Same to be done to other ComboBoxes.

Link, if embeded video doesn't work in Firefox
https://github.com/MediaArea/MediaInfo/assets/10468217/af133654-9bad-4754-bee2-85337265370d

screen2gif-2024-07-04-1955.webm

@JeromeMartinez
Copy link
Member

New build.
This is still slow but as slow as in a build without this PR, I guess that a slowdown was introduced in a a previous PR so not anymore a topic here but still need investigation in a separate issue or PR (@cjee21 I think it is from a previous PR made by you, before v24.06 as v24.06 also has it).

We can discuss it all first, as it saves time

For the moment the only regression I still see is the lack of lines (they are there before this PR) in the light theme, also visible in the video, and it is not expected that theses lines change in a PR about main window position and re-sizable preference windows.

@regs01
Copy link
Author

regs01 commented Jul 4, 2024

I still can't get what slowness are you talking about? Is it one in the video?
https://github.com/MediaArea/MediaInfo/assets/10468217/e8924105-7079-46bf-8925-86a0b95953b8

I didn't make a commit yet. But there is a video with partial fix. I'll finish later, when come home.
https://github.com/MediaArea/MediaInfo/assets/10468217/af133654-9bad-4754-bee2-85337265370d

@cjee21
Copy link
Collaborator

cjee21 commented Jul 5, 2024

New build. This is still slow but as slow as in a build without this PR, I guess that a slowdown was introduced in a a previous PR so not anymore a topic here but still need investigation in a separate issue or PR (@cjee21 I think it is from a previous PR made by you, before v24.06 as v24.06 also has it).

If we're still talking about the Preferences window, here are the commits history: https://github.com/MediaArea/MediaInfo/commits/master/Source/GUI/VCL/GUI_Preferences.cpp
All commits I made are after 24.06 release.
As for the function that launches Preferences window in GUI_Main, the only change I made was to FormResize to fix the blank toolbar visible despite being disabled issue that was reported. This only executes after Preferences window is closed and is after 24.06 release too. (https://github.com/MediaArea/MediaInfo/blame/65794412e6888ff1f9f68a8069600f787f56a6f2/Source/GUI/VCL/GUI_Main.cpp#L1625)

Time taken to open Preferences window:

24.04 (last release before I contribute/32-bit): 0.851s
24.06.20240702 (this PR's first snapshot/32-bit): 1.602s
24.06.20240703 (latest master?/64-bit): 0.751s
24.06.20240704 (this PR's latest snapshot/64-bit): 1.017s

I don't see any statistically significant difference regarding Preferences window after my contributions as expected from the commits history. The slightly faster time might be due to 64-bit and considering that a new option was added by your team recently, the results look good.

I don't know what happened but 1st version of this PR was bad. Now it can be considered okay. But if the faster speed is just due to now having 64-bit, then it is still no good. Take note that the above test results are likely not accurate to tens of ms (based on 30fps video & only run once) so hundred or so ms difference can be ignored.

I still can't get what slowness are you talking about? Is it one in the video? https://github.com/MediaArea/MediaInfo/

I'm not sure which slowness he is talking about (if he is talking about the one in your video, it has been like that for years AFAIK) but the one I talk about in all my comments is time taken for the Preferences window to show up which was bad in 1st build of this PR but can be considered okay now for me.


UPDATE: If you want to know the reason why Preferences window now takes longer to show up, the cause is as I had initially suspected and now confirmed with some tests.

This takes 0~2ms on both 64-bit and 32-bit to execute:

Page->Top=-(Page->TabHeight*1.15);
Page->Height=Page->Height+(Page->TabHeight*1.15);
Cancel->Top=Page->Top+Page->Height+(Cancel->Height*0.15);
OK->Top=Cancel->Top;
ClientHeight=OK->Top+(OK->Height*1.15);

This takes ~310ms on 64-bit and ~530ms on 32-bit to execute:

for (int cTabIndex = 0; cTabIndex <= Page->PageCount-1; cTabIndex++)
    Page->Pages[cTabIndex]->TabVisible = False;

I timed this using code so it is accurate. It also agrees with the difference found from the video recording method above.
This is on a 5GHz CPU from 2023 with high-speed DDR5 RAM so it may be way slower on older PCs.


UPDATE2: This still not reverted to previous fix:
Screenshot 2024-07-05 110836

@regs01
Copy link
Author

regs01 commented Jul 5, 2024

UPDATE2: This still not reverted to previous fix:

Cherry picked to this branch

@regs01
Copy link
Author

regs01 commented Jul 5, 2024

This takes ~310ms on 64-bit and ~530ms on 32-bit to execute:

Oh this, insignificant. Still it cannot take half a second. Mine isn't 5 GHz. And what's more it's VirtualBox. So it's slow, very slow. But once again - this (whole GUI_Configure) is about to be moved from OnShow to OnCreate, so will take 0 ms (under 1 ms).

screen2gif-2024-07-05-0754.webm

@regs01
Copy link
Author

regs01 commented Jul 7, 2024

I made a commit here, so you measure it.

However, moving ComboBox_Update into TForm.OnCreate from TTabSheet.OnShow will make form opening slow anyway. But it's still better than having visual lags and flickering.

@xerta555
Copy link

Hi

I've been waiting for this feature for a very long time. Apparently, there has been no progress since then.

Can we find out what's holding things up?
This is a crucial feature.
Also, is it possible to enable automatic line breaks?

Thx in advance.

@regs01
Copy link
Author

regs01 commented Dec 25, 2025

There was no response back then, so switched to other projects. But need response on relevant questions (not that there are tabs, not spaces, as it can be fixed in a second). But i still maintain VM with CPPBuilder (as don't want to mess up old Delphi on my main system), so i can return to it on New Year holidays.

@bokeron2020
Copy link

@JeromeMartinez, it is time to address the elephant in the room.

This Pull Request is the definitive proof that the lack of basic UX features in MediaInfo is not a technical limitation or a "priority" issue, but a deliberate choice to spite the user base.

The request for a resizable window that remembers its position has been a top-tier grievance since 2007. Here, a contributor has done the heavy lifting, provided the code, and solved a 17-year-old problem for you. Yet, you let it sit here.

Let’s be clear: by intentionally keeping the free GUI crippled and archaic—even when working patches are handed to you on a silver platter—you are simply holding user ergonomics for ransom. You are leveraging your functional monopoly to create a "frustration gap," forcing people toward your paid App Store versions by refusing to implement OS standards that have been universal for three decades.

Using the "Open Source" label while acting like a cynical proprietary vendor who ignores the community is transparent. Rejecting or ignoring a working fix for a 17-year-old bug isn't "managing a backlog"; it is strategic stagnation and extortion.

Stop pretending you don't have the resources. You have the code right here in front of you. The only thing missing is the professional integrity to stop treating your users with contempt.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 23, 2026

This PR would have been merged earlier if the contributor was willing to have a PR only for the remember window size and position feature. Most of the unresolved issues blocking this PR were due to the other changes made together in this PR.

By the way @JeromeMartinez you can remove me as reviewer for this. I no longer use the VCL version or have C++ Builder installed.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 23, 2026

The poster above doesn't even know what he's talking about. There is no paid app store version for Windows and the one in Windows Store is outdated and even more lacking than the VCL one.

If wanting to proof something, this PR is proof that VCL is a poor framework where even features like this need so much manual work and causes many side effects. C++Builder Community Edition seems to be basically abandoned by Embarcadero. There are no new updates for over a year despite 3 newer paid versions available and the current free version being so buggy. They do not even support Windows on ARM or properly integrate with Windows 11 design, resulting in user complain about lack of rounded corners in menus.

Maybe it's time to switch to a better framework that requires less work for basic things and is easier to maintain as well as supporting newer OS and architectures along with being guaranteed to remain supported for free. Other open souce apps are moving from wxWidgets to Qt for example.

@JeromeMartinez JeromeMartinez removed the request for review from cjee21 January 23, 2026 09:58
@JeromeMartinez
Copy link
Member

@cjee21 this is a bit more complicated, both technical and also about how I plan to do in the future as a whole.
Migration to Qt is one part of that, still not happy by the byte size of the deliverable, one of the appreciated "features" of MediaInfo being its size but less and less relevant...

@regs01
Copy link
Author

regs01 commented Jan 23, 2026

This PR would have been merged earlier if the contributor was willing to have a PR only for the remember window size and position feature. Most of the unresolved issues blocking this PR were due to the other changes made together in this PR.

By the way @JeromeMartinez you can remove me as reviewer for this. I no longer use the VCL version or have C++ Builder installed.

It's not possible with GitHub. It had to be completely reset and then cherry picked line by line in diff into different branches. So first it had to be finished. And it mostly was finished. Although then there wouldn't to be much of need in those multiple requests.

If wanting to proof something, this PR is proof that VCL is a poor framework where even features like this need so much manual work and causes many side effects. C++Builder Community Edition seems to be basically abandoned by Embarcadero.

VCL is by far more advanced and simpler than anything Qt can offer. It's just lack of experience with it that leads to all problems. But Qt is far more complicated.

And what exactly and what is proving what? Reading from many files will be as equally slow in Qt.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 24, 2026

It takes more lines of code to do the same thing in VCL than it does in Qt. Dark mode in VCL is lacking aero titlebar on Windows 7, mica titlebar on Windows 11 and window shadows on all Windows versions. It respawns entire window when toggling dark mode. The menu bar's drop-down menu has no rounded corners on Windows 11, there is a user complain for that. The preferences window item has to be manually aligned taking much more time to add a single item compared to other frameworks. The items in preferences window does not auto resize when the preferences window is resized. The integration with IE or Edge WebView2 still glitches out sometimes with blank display for HTML view. VCL requires a custom compiler that even Embarcadero seems to have trouble keeping updated, it is still using very old Clang that does not support ARM64, no CFG, cannot compile code in parallel. How's that far more advanced. Since you are experienced in VCL, maybe you can fix some of the above. I am not the right person to be doing VCL work.

One more thing to improve for MediaInfo VCL version that is not related to VCL vs Qt framework is that the VCL version GUI hangs with not responding when MediaInfo takes longer to parse files due to it being run on main UI thread.

There's also user requests for ability to customize the font used.

Let's not even talk about the buggy C++Builder IDE that has broken autocomplete and code lookup among other issues and annoyances or the quality of Embarcadero's documentation for the C++ APIs.

@regs01
Copy link
Author

regs01 commented Jan 24, 2026

Dark mode in VCL is lacking aero titlebar on Windows 7

Windows 7 doesn't have dark mode. And it doesn't matter since Qt6 doesn't support Windows 7 any longer.

It takes more lines of code to do the same thing in VCL than it does in Qt.

Absolutely not. Especially if using Pascal. But even with C++ still VCL is far more simpler. And Qt6 doesn't have proper high DPI scaling. They ditching proper DPI scaling in favor of pixel ratio scaling, similar to browsers, which is unacceptable for applications.

The menu bar's drop-down menu has no rounded corners on Windows 11, there is a user complain for that.

Neither in Qt. It's up to Win32 style. This is 6.10.1 with Win32 style.
menu-test_2026-01-24_09-46-02

There's also user requests for ability to customize the font used.

It's just a component property. It's equally simple in VLC/LCL/WF/Qt etc etc.

does not support ARM64,

Well, yes. It doesn't support ARM64 as of yet. It's where Free Pascal/Lazarus/LCL beats them all, supporting x86, ARM, RISC-V, MIPS, LoongArch etc etc and any type of system - Windows, Linux, macOS, other BSDs etc etc - trully cross platform.

One more thing to improve for MediaInfo VCL version that is not related to VCL vs Qt framework is that the VCL version GUI hangs with not responding when MediaInfo takes longer to parse files due to it being run on main UI thread.

RefreshFilesList is a part of MediaInfo itself, not MediaInfoGUI. It's not using VCL. And Qt version is not using RefreshFilesList. Also it doesn't read content of locale files. It just using filenames. That's why it happens fast. It also doing it once at form creation. That's why you don't see UI lag. It's, again, just matter of implementations. You can do the same with VCL. It's also doesn't store locales in files on disk, instead reading them from resource. Although it makes it a little slower.

Moving it to form creation was one of that change you didn't like.

The integration with IE or Edge WebView2 still glitches out sometimes with blank display for HTML view.

There is no Edge in Windows 7. And VCL version is using TWebBrowser. Although there is TEdgeBrowser, at least in CppBuilder 12. But TWebBrowser/TCppWebBrowser are using SHDocVw.dll, which is Trident (Internet Explorer).

The preferences window item has to be manually aligned taking much more time to add a single item compared to other frameworks. The items in preferences window does not auto resize when the preferences window is resized.

That could be fixed in a single click. VCL has better alignment capabilities than Qt. LCL is even more supperior, but no C++. And this was among fixes.

@regs01
Copy link
Author

regs01 commented Jan 24, 2026

I've reset my master and updated CppBuilder. In coming days i'll readd changes with multiple branches and multiple merge requests.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 24, 2026

Windows 7 doesn't have dark mode. And it doesn't matter since Qt6 doesn't support Windows 7 any longer.

Doesn't support (technically Windows 10 does not have dark mode for Win32 apps either) but users will still want dark mode and MediaInfo VCL does have dark mode on Windows 7 although it looks non-ideal. We can use older Qt to have a separate build for Windows 7 if needed but MediaInfo Qt is not yet deployed for Windows and will likely only be used to replace UWP one in Store so let's not talk about this.

But even with C++ still VCL is far more simpler.

Simplify it then. Maybe I am not good in VCL and implemented dark mode in non-ideal way. In Qt it takes less than 10 lines of CPP to control dark mode and it works out-of-the-box on Windows 11 with zero lines of code if just following system settings. Well adding conformance button to VCL and Qt each took around 40 lines of code so fair enough but adding new setting still feels faster and easier in Qt, maybe due to MediaInfo's VCL codebase not in ideal condition.

Qt6 doesn't have proper high DPI scaling.

Whatever they did, at least it works fine with zero additional code unlike VCL which requires so many bugfixes previously.

This is 6.10.1 with Win32 style.

Mica titlebar, window shadows, rounded menu drop-downs...

Screenshot 2026-01-24 175503

RefreshFilesList is a part of MediaInfo itself, not MediaInfoGUI. It's not using VCL. And Qt version is not using RefreshFilesList.

I am not taking about the preferences window and this is not related to framework as I said. It is just something to improve in VCL version. There should be a progress bar or something while MediaInfoLib is opening files instead of freezing the entire UI.

Moving it to form creation was one of that change you didn't like.

You can move it now if it does not break anything. I am no longer touching the VCL codes anyway so do whatever you want.

There is no Edge in Windows 7.

There is Edge WebView on Windows 7 and MediaInfo's VCL GUI currently will use Edge WebView 2 whenever available. It has also been tested on Windows 7. Any way, whether IE or Edge, the HTML view just feels fragile. Will be great if can be made more reliable.

That could be fixed in a single click. VCL has better alignment capabilities than Qt.

Okay. Go align it so that there is no longer need to manually shift items manually pixel by pixel when adding a new option in the future.

I've reset my master and updated CppBuilder. In coming days i'll readd changes with multiple branches and multiple merge requests.

Great. Just take note that the official build farm is still using C++Builder 11 to maintain compatibility with Windows 7 (according to Jerome, the binary built with ver 12 does not work on Windows 7 out-of-the-box) so it should still be build-able with version 11.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 24, 2026

btw make sure all alignment is pixel-perfect on all DPI settings. If it is even off by 1 pixel, someone named Klaus1189 will create an issue report.

@regs01
Copy link
Author

regs01 commented Jan 24, 2026

Okay. Go align it so that there is no longer need to manually shift items manually pixel by pixel when adding a new option in the future.

It was already among fixes.

Great. Just take note that the official build farm is still using C++Builder 11 to maintain compatibility with Windows 7 (according to Jerome, the binary built with ver 12 does not work on Windows 7 out-of-the-box) so it should still be build-able with version 11.

Community edition has limited time license. Mine run out. It's not possible to obtain RAD Studio 11 licenses anymore. But it doesn't matter much.

Whatever they did, at least it works fine with zero additional code unlike VCL which requires so many bugfixes previously.

But custom drawn components and icons are not crisp. Especially on non-integer scales. Because there is no direct pixel access.

VCL GUI currently will use Edge WebView 2 whenever available

I don't see it in code.

In Qt it takes less than 10 lines of CPP to control dark mode and it works out-of-the-box on Windows 11 with zero lines of code if just following system settings. Well adding conformance button to VCL and Qt each took around 40 lines of code so fair enough but adding new setting still feels faster and easier in Qt, maybe due to MediaInfo's VCL codebase not in ideal condition.

But it won't be Win32 style. Essentially it comes down to matter of taste, but there is nothing wrong in prioritizing system style. I always use windowsvista theme with Qt apps. So it's still same lines of code to allow to select and switch it.

Main menu of Qt version isn't nice, btw. At least light version. Just black outline instead of shadow. And way too rounded. And scaling has its bugs as well. Main menu isn't properly scaled. And tree view items aren't scaled.
MediaInfo_2026-01-24_14-46-47
MediaInfo_2026-01-24_14-43-13

I am not taking about the preferences window and this is not related to framework as I said. It is just something to improve in VCL version. There should be a progress bar or something while MediaInfoLib is opening files instead of freezing the entire UI.

Well, Qt version has progress bar implemented, but it's not VCL fault, that it's not implemented in VCL version. But there isn't much need for progress bar for 1 second.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 24, 2026

VCL GUI currently will use Edge WebView 2 whenever available

I don't see it in code.

I thought you are very experienced with VCL. I wonder why you cannot see it.

But custom drawn components and icons are not crisp. Especially on non-integer scales. Because there is no direct pixel access.

All of Microsoft's new apps and OS UI uses WinUI3 which can be considered 'custom drawn' like Qt. There are no sharpness issue with both. Older Win32 apps are the ones lacking crispness. Isn't custom drawing direct pixel access? But I don't want to talk about this anymore. Does not matter here. Actually VCL styles are doing custom drawing and it seems to be needed to get dark theme with it so what's the point.

And way too rounded. And scaling has its bugs as well. Main menu isn't properly scaled. And tree view items aren't scaled.

It's not too rounded. This is Microsoft's standard menu for Windows. I do not see scalling issues in MediaInfo Qt. On 100% and 150%, everything looks exactly identical except the DPI unlike the other GUI where buttons and alignment are different. Traditional Win32 apps no longer look native on Windows 11 or meet the design guidelines. Qt actually attempts to follow the latest Microsoft design guidelines on Windows 11. Doing so requires custom drawing like Microsoft's own WinUI3 framework. There are issues with Qt's menu shadows and the roundedness does not fully match Windows style but a fix has been committed for Qt 6.11 which should use Windows provided border and shadows for the menus instead of manually drawing.


https://learn.microsoft.com/en-us/windows/apps/develop/ui/controls/images/menu-bar-submenu.png

MediaInfo Qt 6.11

Screenshot 2026-01-25 050717 Screenshot 2026-01-25 050020

But there isn't much need for progress bar for 1 second.

Try opening 10+ 1GB MPEG-TS files and watch the GUI hang.

Also note that some users open thousands of files at once with MediaInfo GUI. There was such a user in one of the issues here that ran into some 32-bit bug.

And like I alredy said, this is not framework problem. Just that it is something that can be improved in VCL version to prevent UI hangs. Just letting you know since you may want to do something about it since you are good at VCL coding.

@JeromeMartinez
Copy link
Member

One more thing to improve for MediaInfo VCL version that is not related to VCL vs Qt framework is that the VCL version GUI hangs with not responding when MediaInfo takes longer to parse files due to it being run on main UI thread. [...] Try opening 10+ 1GB MPEG-TS files and watch the GUI hang.

This is a problem with my code, I know, there is a lot to do on it, and at some point I'll refactor that. And this is a bit out of topic...

@regs01
Copy link
Author

regs01 commented Jan 27, 2026

I thought you are very experienced with VCL. I wonder why you cannot see it.

I would be glad if you point me a place where that WebView2 declared and created. But so far I can only see TWebBrowser.

#include <SHDocVw.hpp>
//---------------------------------------------------------------------------
class TWebF : public TForm
{
  __published:
    TWebBrowser *Browser;
    void __fastcall BrowserNavigateComplete2(TObject *ASender, IDispatch * const pDisp, const OleVariant &URL);
  private:
  public:
    __fastcall TWebF(TComponent* Owner);
    void __fastcall Execute();
};

I do not see scalling issues in MediaInfo Qt.

I do. And I pointed on them with screenshots. "Kind of works for me" is not an answer.

Try opening 10+ 1GB MPEG-TS files and watch the GUI hang.

I tried 100 GB files. Under 1 second per file. A 1000 could be long, but, again, threading is implemented in MediaInfo itself, not in Qt GUI. It can be used with VCL GUI as well. It is, however, requires some extensive rework to switch to Core unit. But wouldn't be long to implement some of VCL's threading solutions.

Traditional Win32 apps no longer look native on Windows 11 or meet the design guidelines.

Win32 is Win32. WinUI is WinUI. They both natively looking. One is for desktop (what is nowadays some call business UI), another is adaptive UI. Qt UI is that desktop UI. Qt has QML for adaptive UI. You using either of them. It doesn't go together when parts of interface have giant oversized touch oriented elements and other small desktop and mouse oriented elements.

There are no sharpness issue with both.

But there is. Just because it's oversharing final image it doesn't means it sharp and DPI native.

Isn't custom drawing direct pixel access?

No. With pixel ratio scaling pixel itself is scaled, so it's virtual. You can't draw a single pixel. At 200% minimum you can access is a group of 4 pixels. Basically saying it's raster scaling very same as System scaling. Just adds more sharpness and draws text after scaling.

@cjee21
Copy link
Collaborator

cjee21 commented Jan 27, 2026

I would be glad if you point me a place where that WebView2 declared and created.

This is one thing that VCL does make easy.

SelectedEngine = EdgeIfAvailable

I do. And I pointed on them with screenshots. "Kind of works for me" is not an answer.

I do not see any issues with your screenshot. The scalling issues I talk about are how using different scalling results in different layouts/looks/alignments. If you mean Qt's menu design is not spaced properly, that's not scalling issue but how they chose to design it. They aim to follow Microsoft's fluent design guidelines for the new Windows 11 style but are still tweaking it.

Win32 is Win32. WinUI is WinUI.

But VCL's menu does not even look like Windows Device Manager's menu and that's why there is an issue created by someone here.

No. With pixel ratio scaling pixel itself is scaled, so it's virtual.

I'll just let AI answer:

The claim states that at 200% scaling, the minimum you can access is a group of 4 pixels. This is incorrect.

Both Qt and WinUI 3 allow you to bypass "logical" coordinates and target the device-specific physical pixels if you really want to.

In Qt: You can use devicePixelRatio() to calculate the exact physical coordinates. If you use QPainter on a QImage or QPixmap with the correct device pixel ratio set, you can absolutely manipulate a single 1×1 physical pixel on a 4K display.

In WinUI 3: Through Composition surfaces or Win2D, you can render at the full native resolution of the screen. You aren't "locked out" of those extra pixels; the framework just abstracts them away by default to keep your UI from looking tiny.

and in normal use, the abstraction is helpful so that you do not need to manually calculate and scale everything. The underlying framework scales things before painting the raw pixels ensuring everything has the same look regardless of scale and remains sharp. They do custom drawing on the actual pixels not draw then scale by interpolation.

Win32 apps like Device Manager are the ones using GDI scalling and are not as sharp.

PS. btw frameworks like Qt, I mentioned that is requires less code which is true in some aspects. They have many built-in functions like handling temporary files or remembering window state and position. So they do not require 100 lines of code to manually do it. MediaInfo Qt already has remember window size and position implemented by @JeromeMartinez years ago but it took this long for VCL. By using such frameworks, more time can be spent working on other parts of MedaInfo. The buggy C++Builder IDE compared to Qt Creator and Visual Studio also means more time to write the same amount of code due to broken auto-complete and code look-up for example. The poor documentation by Embarcadero does not help too.

One thing VCL helps more than Qt is integration with IE and Edge, whereas Qt requires self-implementation of Edge WebView if not using QML at the moment unless wanting to bundle Qt WebEngine. VCL's integration with IE and Edge does not feel very solid though (glitches and crashes seen before) or maybe that's due to how MediaInfo GUI uses it.

Anyway, let's stop debating frameworks. We have said what we wanted and it's clear that we will not reach any conclusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants