From e3ca8a2557df8760e2bc47f43bc3b81a5280b29d Mon Sep 17 00:00:00 2001 From: Thomas Rohwer Date: Thu, 16 Apr 2020 15:37:38 +0000 Subject: Fix for bug 562126 SWT Toolbar not Visible with Certain Scaling Factors (HiDPI) The option TBSTYLE_EX_HIDECLIPPEDBUTTONS hides toolbar items completely instead of clipping them. A slight reduction in size can happen on certain scaling factors for a sequence of computeSize, setSize on certain scaling factors as described in the bug description. I think it is in general better to show a slightly clipped button than nothing at all, but this should be reviewed. Change-Id: If70bac6b8efd8a33f58fa6b5468d9466fe0d0ad1 Signed-off-by: Thomas Rohwer --- .../Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java index 953dc7f93a..48a71c9cd8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java @@ -360,7 +360,7 @@ void createHandle () { OS.SendMessage (handle, OS.TB_SETBUTTONSIZE, 0, 0); /* Set the extended style bits */ - int bits = OS.TBSTYLE_EX_DRAWDDARROWS | OS.TBSTYLE_EX_MIXEDBUTTONS | OS.TBSTYLE_EX_HIDECLIPPEDBUTTONS | OS.TBSTYLE_EX_DOUBLEBUFFER; + int bits = OS.TBSTYLE_EX_DRAWDDARROWS | OS.TBSTYLE_EX_MIXEDBUTTONS | OS.TBSTYLE_EX_DOUBLEBUFFER; OS.SendMessage (handle, OS.TB_SETEXTENDEDSTYLE, 0, bits); } -- cgit v1.2.3