Skip to content
Open
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 @@ -4860,7 +4860,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
if (hStateList != 0) {
int [] cx = new int [1], cy = new int [1];
OS.ImageList_GetIconSize (hStateList, cx, cy);
newWidth += cx [0] + INSET;
newWidth += cx [0] + Win32DPIUtils.pointToPixel(INSET, getZoom());
}
long hImageList = OS.SendMessage (handle, OS.LVM_GETIMAGELIST, OS.LVSIL_SMALL, 0);
if (hImageList != 0) {
Expand All @@ -4880,7 +4880,7 @@ boolean setScrollWidth (TableItem item, boolean force) {
*/
newWidth++;
}
newWidth += INSET * 2 + VISTA_EXTRA;
newWidth += Win32DPIUtils.pointToPixel(INSET * 2, getZoom()) + VISTA_EXTRA;
int oldWidth = (int)OS.SendMessage (handle, OS.LVM_GETCOLUMNWIDTH, 0, 0);
if (newWidth > oldWidth) {
setScrollWidth (newWidth);
Expand Down Expand Up @@ -6962,7 +6962,7 @@ LRESULT wmNotifyHeader (NMHDR hdr, long wParam, long lParam) {
}
}

int x = rects[i].left + INSET + 2;
int x = rects[i].left + Win32DPIUtils.pointToPixel(INSET + 2, getZoom());
if (columns[i].image != null) {
GCData data = new GCData();
data.device = display;
Expand Down Expand Up @@ -7303,9 +7303,9 @@ LRESULT wmNotifyToolTip (NMTTCUSTOMDRAW nmcd, long lParam) {
int zoom = getZoom();
rect = Win32DPIUtils.pixelToPoint(rect, zoom);
gc.drawImage (image, rect.x, rect.y, rect.width, rect.height, DPIUtil.pixelToPoint(x, zoom), DPIUtil.pixelToPoint(y, zoom), DPIUtil.pixelToPoint(size.x, zoom), DPIUtil.pixelToPoint(size.y, zoom));
x += size.x + INSET + (pinfo.iSubItem == 0 ? -2 : 4);
x += size.x + Win32DPIUtils.pointToPixel(INSET + (pinfo.iSubItem == 0 ? -2 : 4), zoom);
} else {
x += INSET + 2;
x += Win32DPIUtils.pointToPixel(INSET + 2, getZoom());
}
String string = item.getText (pinfo.iSubItem);
if (string != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
}
}
if (!getImage) rect.left = rect.right;
rect.right += width + Table.INSET * 2;
rect.right += width + Win32DPIUtils.pointToPixel(Table.INSET * 2, getZoom());
}
} else {
if (getText) {
Expand Down Expand Up @@ -377,7 +377,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
iconRect.top = column;
iconRect.left = OS.LVIR_ICON;
if (OS.SendMessage (hwnd, OS. LVM_GETSUBITEMRECT, row, iconRect) != 0) {
rect.left = iconRect.right + Table.INSET / 2;
rect.left = iconRect.right + Win32DPIUtils.pointToPixel(Table.INSET / 2, getZoom());
}
}
} else {
Expand All @@ -404,7 +404,7 @@ RECT getBounds (int row, int column, boolean getText, boolean getImage, boolean
char [] buffer = string.toCharArray ();
int flags = OS.DT_NOPREFIX | OS.DT_SINGLELINE | OS.DT_CALCRECT;
OS.DrawText (hDC, buffer, buffer.length, textRect, flags);
rect.right += textRect.right - textRect.left + Table.INSET * 3 + 2;
rect.right += textRect.right - textRect.left + Win32DPIUtils.pointToPixel(Table.INSET * 3 + 2, getZoom());
}
}
}
Expand Down Expand Up @@ -700,9 +700,9 @@ Rectangle getTextBoundsInPixels (int index) {
if (itemIndex == -1) return new Rectangle (0, 0, 0, 0);
RECT rect = getBounds (itemIndex, index, true, false, true);
rect.left += 2;
if (index != 0) rect.left += Table.INSET;
if (index != 0) rect.left += Win32DPIUtils.pointToPixel(Table.INSET, getZoom());
rect.left = Math.min (rect.left, rect.right);
rect.right = rect.right - Table.INSET;
rect.right = rect.right - Win32DPIUtils.pointToPixel(Table.INSET, getZoom());
int width = Math.max (0, rect.right - rect.left);
int height = Math.max (0, rect.bottom - rect.top);
return new Rectangle (rect.left, rect.top, width, height);
Expand Down
Loading