Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 6592

Summary: Box for checkbox table items is too large when using large fonts
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: SWTAssignee: Veronika Irvine <veronika_irvine>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: Tod_Creasey
Version: 2.0Keywords: accessibility
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
GIF screen shot none

Description Nick Edgar CLA 2001-12-05 11:01:57 EST
Build 20011204.

I have my Windows appearance scheme as "Lilac, large fonts" to
test accessibility.
When in this mode, the box for checkbox table items is too large.
See attached screen shot.
Comment 1 Nick Edgar CLA 2001-12-05 11:03:57 EST
Created attachment 155 [details]
GIF screen shot
Comment 2 Mike Wilson CLA 2001-12-05 14:20:55 EST
I'm not sure what's going on, but it's not that it is too large. The screen 
snapshot seems to show the box being drawn in the wrong place. Plus it's 
clipped sometimes against the top and not others. 
Comment 3 Nick Edgar CLA 2001-12-05 14:45:33 EST
You're right.  It thought for some reason it was more "bold" in my current 
appearance settings, but it's the same in the default settings.

It got clipped when I scrolled partway down the list, then back up.
Since they were positioned too high, their tops got clipped by the top of the 
window, then didn't redraw properly when scrolled back.
Comment 4 Mike Wilson CLA 2001-12-10 12:18:14 EST
*** Bug 4574 has been marked as a duplicate of this bug. ***
Comment 5 Veronika Irvine CLA 2002-01-08 13:24:21 EST
Here is a simple example thta shows the problem.
Create an image called imageSmall.bmp that is smaller than the font height and 
run the example.
Scroll the table and see that the state image is being forced to have the same 
height as the item image - chops off the top part of the image.

public static void main(String[] args) {
	Display display = new Display();
	Image image = new Image(display, _Scrapbook.class.getResourceAsStream 
("imageSmall.bmp"));
	Shell shell = new Shell(display);
	shell.setLayout(new GridLayout());
	Table table = new Table(shell, SWT.CHECK | SWT.BORDER);
	table.setLayoutData(new GridData(GridData.FILL_BOTH));
	TableColumn column = new TableColumn(table, SWT.NONE);
	for (int i = 0; i < 100; i++) {
		TableItem item = new TableItem(table, SWT.NONE);
		item.setText("item " + i);
		item.setImage(image);
	}
	column.pack();
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
	display.dispose();
}
Comment 6 Veronika Irvine CLA 2002-01-08 16:19:07 EST
Fixed in > 20020108