Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,9 @@ LRESULT CDDS_ITEMPOSTPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
if (explorerTheme) {
if (hooks (SWT.EraseItem)) {
RECT itemRect = item.getBounds (index, true, true, false, false, true, hDC);
itemRect.left -= EXPLORER_EXTRA;
itemRect.right += EXPLORER_EXTRA + 1;
int explorerExtraInPixels = Win32DPIUtils.pointToPixel(EXPLORER_EXTRA, zoom);
itemRect.left -= explorerExtraInPixels;
itemRect.right += explorerExtraInPixels + 1;
pClipRect.left = itemRect.left;
pClipRect.right = itemRect.right;
if (columnCount > 0 && hwndHeader != 0) {
Expand Down Expand Up @@ -1129,17 +1130,19 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
selectionForeground = clrText = OS.GetSysColor (OS.COLOR_HIGHLIGHTTEXT);
}
if (explorerTheme) {
int zoom = getZoom();
if ((style & SWT.FULL_SELECTION) == 0) {
RECT pRect = item.getBounds (index, true, true, false, false, false, hDC);
RECT pClipRect = item.getBounds (index, true, true, true, false, true, hDC);
int explorerExtraInPixels = Win32DPIUtils.pointToPixel(EXPLORER_EXTRA, zoom);
if (measureEvent != null) {
pRect.right = Math.min (pClipRect.right, boundsInPixels.x + boundsInPixels.width);
} else {
pRect.right += EXPLORER_EXTRA;
pClipRect.right += EXPLORER_EXTRA;
pRect.right += explorerExtraInPixels;
pClipRect.right += explorerExtraInPixels;
}
pRect.left -= EXPLORER_EXTRA;
pClipRect.left -= EXPLORER_EXTRA;
pRect.left -= explorerExtraInPixels;
pClipRect.left -= explorerExtraInPixels;
long hTheme = OS.OpenThemeData (handle, Display.TREEVIEW, getZoom());
int iStateId = selected ? OS.TREIS_SELECTED : OS.TREIS_HOT;
if (OS.GetFocus () != handle && selected && !hot) iStateId = OS.TREIS_SELECTEDNOTFOCUS;
Expand Down Expand Up @@ -1208,8 +1211,9 @@ LRESULT CDDS_ITEMPREPAINT (NMTVCUSTOMDRAW nmcd, long wParam, long lParam) {
OS.SaveDC (hDC);
OS.SelectClipRgn (hDC, 0);
if (explorerTheme) {
itemRect.left -= EXPLORER_EXTRA;
itemRect.right += EXPLORER_EXTRA;
int explorerExtraInPixels = Win32DPIUtils.pointToPixel(EXPLORER_EXTRA, getZoom());
itemRect.left -= explorerExtraInPixels;
itemRect.right += explorerExtraInPixels;
}
//TODO - bug in Windows selection or SWT itemRect
/*if (selected)*/ itemRect.right++;
Expand Down
Loading