Using Delphi 10 Seattle on Windows 10, as well as the Windows 10 Dark VCL Style. When the window is in its normal state, hovering over the taskbar icon shows the full window in the thumbnail. However, if I minimize my application, then hovering over the taskbar icon only shows the titlebar in the thumbnail. Further, if I hover over the thumbnail, the window preview also only shows the titlebar, nothing else. If I restore my window back to its natural state, everything works fine again.
I'm sure it has to do with the particular VCL style "Windows 10 Dark" because other VCL styles do not behave this way. In fact, without using VCL styles at all, the preview only shows the client area of the form, and doesn't show the titlebar at all. But using this style, all I can see is the titlebar.
Here's a blank form with only the "Windows 10 Dark" style applied, no code:
When the window is in its normal state, Aero Peek shows fine:
And when it's in its minimized state, only shows title bar:
And when hovering over the minimized thumbnail, also only shows title bar:
As you can see, this completely defeats the purpose of Aero Peek. It looks like something is causing it to revert back to the ancient Windows 3.1 minimized window style.
I've installed the vcl-style-utils
library and tried the Vcl.Styles.Fixes
unit, among others, but still no luck. This behavior is confirmed to occur on 4 different installations of Delphi 10 Seattle (Update 1).
What's causing this to happen and how can I make the preview work properly?
EDIT
When I said "It doesn't happen on other styles", this was not thoroughly proven. I was judging based on other apps which had previously been compiled in Delphi 10 Seattle. While in reality, actually all VCL styles are doing this. Without using any VCL Styles, everything works as expected.
To add, those pre-built applications which did not show such behavior also have these styles embedded and applied manually. Whereas, a new empty application exhibits this behavior by assigning the style through the IDE Project Options.
In light of this, I will further test to see if manually embedding/applying styles really does make a difference.
EDIT 2
As said, I tested a bit with manually assigning styles. After copying the code in this other answer, after switching off and back on the style in runtime, suddenly I no longer see this behavior. So it appears this issue only occurs when loading the default style. The pre-compiled applications I spoke of in prior edit all are designed to dynamically apply styles in runtime, regardless of the one set up in the IDE.
EDIT 3
Oddly, after it worked the first time after EDIT 2, now I cannot get it to work as expected again. Switching the style in runtime is no longer "fixing" this. It only seemed to "fix" it once. So why everything works fine in our production applications, is a matter of further investigation. Technically, those applications don't even have the styles embedded inside of them. They're actually embedded into a single DLL which is then shared by those applications, and their resources are extracted and applied in runtime. So I will have to dig in and try to re-create the working code.