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

Floating Toolbar/DockPanels with Resizable & Win 10 #12

Open
hpw4711 opened this issue May 13, 2018 · 3 comments
Open

Floating Toolbar/DockPanels with Resizable & Win 10 #12

hpw4711 opened this issue May 13, 2018 · 3 comments

Comments

@hpw4711
Copy link

hpw4711 commented May 13, 2018

As it goes for an 13 th...

If you use a floating & resizable toolbar and/or dockpanel on Win 10 (resizable = false is OK!!) the NC caption get's ugly with a WHITE bar at the top of the Toolwindow.

image

Currently I am working to fix it, but looks ugly while on

  1. All Themes: Border.Y := GetSystemMetrics(YMetrics[Resizable]) is not used to a common function

  2. also the NC caption drawing requires adapation

while the ugly part on Win 10 and new Windows-Themes, the border width is now 1 pixel and may also Windows- Themes dependent.

@hpw4711
Copy link
Author

hpw4711 commented May 15, 2018

Well my solution so far to get the frames right:

image

the change was done at TB2Dock unit:

procedure TTBFloatingWindowParent.CreateParams(var Params: TCreateParams);

snip change:

if not(csDesigning in ComponentState) then begin
  // gets ugly white top NC frame
  //  Style := WS_POPUP or WS_BORDER or ThickFrames[FDockableWindow.FResizable];

  // hpw1398
  Style := WS_POPUP or WS_BORDER;
end

@plashenkov
Copy link
Owner

Yes, it looks like there is no better way to do this. But let's remove WS_THICKFRAME for Windows 10 only. Which is the best method to detect we are on Windows 10?

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

No branches or pull requests

2 participants