Skip to content
Merged
Show file tree
Hide file tree
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 @@ -2964,11 +2964,11 @@ TreeItem getFocusItem () {
*/
public int getGridLineWidth () {
checkWidget ();
return DPIUtil.pixelToPoint(getGridLineWidthInPixels (), getZoom());
return GRID_WIDTH;
}

int getGridLineWidthInPixels () {
return GRID_WIDTH;
return Win32DPIUtils.pointToPixel(GRID_WIDTH, getZoom());
}

/**
Expand Down Expand Up @@ -8060,7 +8060,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long wParam, long lParam) {
int deltaX = newItem.cxy - oldItem.cxy;
RECT headerRect = new RECT ();
OS.SendMessage (hwndHeader, OS.HDM_GETITEMRECT, phdn.iItem, headerRect);
int gridWidth = linesVisible ? GRID_WIDTH : 0;
int gridWidth = linesVisible ? getGridLineWidthInPixels() : 0;
rect.left = headerRect.right - gridWidth;
int newX = rect.left + deltaX;
rect.right = Math.max (rect.right, rect.left + Math.abs (deltaX));
Expand Down Expand Up @@ -8239,7 +8239,7 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long lParam) {
}
if (drawForeground) {
int nSavedDC = OS.SaveDC (nmcd.hdc);
int gridWidth = getLinesVisible () ? Table.GRID_WIDTH : 0;
int gridWidth = getLinesVisible () ? getGridLineWidthInPixels() : 0;
RECT insetRect = toolTipInset (cellRect [0]);
OS.SetWindowOrgEx (nmcd.hdc, insetRect.left, insetRect.top, null);
GCData data = new GCData ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public void pack () {
}
if (newFont != 0) OS.SelectObject (hDC, oldFont);
OS.ReleaseDC (hwnd, hDC);
int gridWidth = parent.linesVisible ? Tree.GRID_WIDTH : 0;
int gridWidth = parent.linesVisible ? parent.getGridLineWidthInPixels() : 0;
setWidthInPixels (Math.max (headerWidth, columnWidth + gridWidth));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ RECT getBounds (int index, boolean getText, boolean getImage, boolean fullText,
}
}
}
int gridWidth = parent.linesVisible && columnCount != 0 ? Tree.GRID_WIDTH : 0;
int gridWidth = parent.linesVisible && columnCount != 0 ? parent.getGridLineWidthInPixels() : 0;
if (getText || !getImage) {
rect.right = Math.max (rect.left, rect.right - gridWidth);
}
Expand Down
Loading