Summary: | swt-selection-background-color on Tree not painting correctly | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Page <pagew2000> | ||||||||
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||
Status: | NEW --- | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | ||||||||||
Version: | 4.16 | ||||||||||
Target Milestone: | --- | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows 10 | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Created attachment 284655 [details]
image2.png: shows no issue when swt-selection-background-color is not used.
Created attachment 284656 [details]
The zip file contains the source code to demo the issue.
|
Created attachment 284654 [details] image1.png: shows the paint issue I have a css defined for Tree : Tree { color: #1e1e1e; background-color: #ffffff; swt-selection-background-color: #cde6eb; swt-selection-border-color: #cde6eb; swt-selection-color: #1e1e1e; swt-hot-background-color: #daecf0; swt-hot-border-color: #daecf0; } When the tree has a horizontal scrollbar, the selection background is only painted half way up-to where the scrollbar is (see attachment image1). If I enlarge the view to display the complete tree node, the problem goes away. If I remove "swt-selection-background-color" and "swt-selection-border-color" from css, the problem goes away. (see attachment image2) The tree is create as following: public E4CustomOverview( Composite parent ) { viewer = new TreeViewer( parent ); viewer.setContentProvider( new TreeContentProvider() ); viewer.getTree().setHeaderVisible( true ); viewer.getTree().setLinesVisible( true ); TreeViewerColumn viewerColumn = new TreeViewerColumn( viewer, SWT.NONE ); viewerColumn.getColumn().setWidth( 300 ); viewerColumn.getColumn().setText( "Objects" ); viewerColumn.setLabelProvider( new MyLabelProvider() ); GridLayoutFactory.fillDefaults().generateLayout( parent ); viewer.setInput(new String[] { "Welcome to this funny node that doesn't paint correctly" }); } I have also attached the eclipse project which duplicates the issue.