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 @@ -2334,11 +2334,11 @@ int getFocusIndex () {
*/
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 @@ -5308,7 +5308,7 @@ public void showColumn (TableColumn column) {
OS.GetScrollInfo (handle, OS.SB_HORZ, info);
int newPos = info.nPos;
if (newPos < oldPos) {
rect.right = oldPos - newPos + GRID_WIDTH;
rect.right = oldPos - newPos + getGridLineWidthInPixels();
OS.InvalidateRect (handle, rect, true);
}
}
Expand Down Expand Up @@ -6353,7 +6353,7 @@ LRESULT WM_HSCROLL (long wParam, long lParam) {
if (newPos < oldPos) {
RECT rect = new RECT ();
OS.GetClientRect (handle, rect);
rect.right = oldPos - newPos + GRID_WIDTH;
rect.right = oldPos - newPos + getGridLineWidthInPixels();
OS.InvalidateRect (handle, rect, true);
}
}
Expand Down Expand Up @@ -6462,9 +6462,9 @@ LRESULT WM_VSCROLL (long wParam, long lParam) {
long oneItem = OS.SendMessage (handle, OS.LVM_APPROXIMATEVIEWRECT, 1, 0);
int itemHeight = OS.HIWORD (oneItem) - OS.HIWORD (empty);
if (code == OS.SB_LINEDOWN) {
clientRect.top = clientRect.bottom - itemHeight - GRID_WIDTH;
clientRect.top = clientRect.bottom - itemHeight - getGridLineWidthInPixels();
} else {
clientRect.bottom = clientRect.top + itemHeight + GRID_WIDTH;
clientRect.bottom = clientRect.top + itemHeight + getGridLineWidthInPixels();
}
OS.InvalidateRect (handle, clientRect, true);
break;
Expand Down Expand Up @@ -7283,7 +7283,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);
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 @@ -415,7 +415,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
* the grid width when the grid is visible. The fix is to
* move the top of the rectangle up by the grid width.
*/
int gridWidth = parent.getLinesVisible () ? Table.GRID_WIDTH : 0;
int gridWidth = parent.getLinesVisible () ? parent.getGridLineWidthInPixels() : 0;
rect.top -= gridWidth;
if (column != 0) rect.left += gridWidth;
rect.right = Math.max (rect.right, rect.left);
Expand Down
Loading