Skip to content

Commit

Permalink
ToolItem with SWT.CHECK is not well displayed when checked and with (#…
Browse files Browse the repository at this point in the history
…542)

background setted.

Fix : #541
  • Loading branch information
RoiSoleil authored Apr 25, 2023
1 parent 84b1a43 commit fbd70cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ void layoutItems () {
}
}
}

/*
* Feature in Windows. When a tool bar is not flagged TBSTYLE_LIST already (SWT.RIGHT)
* and contains both text and images, but not text + image in a single item,
Expand Down Expand Up @@ -1691,7 +1691,6 @@ LRESULT wmNotifyChild (NMHDR hdr, long wParam, long lParam) {
RECT rect = new RECT (nmcd.left, nmcd.top, nmcd.right, nmcd.bottom);
OS.SetDCBrushColor (nmcd.hdc, child.background);
OS.FillRect (nmcd.hdc, rect, OS.GetStockObject (OS.DC_BRUSH));
result |= OS.TBCDRF_NOBACKGROUND;
}
return new LRESULT (result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public static void main(String[] args) {
toggle.setText("Toggle Bar Colors");
new ToolItem(bar, SWT.SEPARATOR);
new ToolItem(bar, SWT.PUSH).setText("Push Button");
new ToolItem(bar, SWT.CHECK).setText("Check Button");
new ToolItem(bar, SWT.DROP_DOWN).setText("Drop Down");

toggle.addListener(SWT.Selection, event -> {
Expand Down

0 comments on commit fbd70cd

Please sign in to comment.