Bug 562783 - [Dark theme] Hover color white in the windows
Summary: [Dark theme] Hover color white in the windows
Status: CLOSED DUPLICATE of bug 567616
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 577357
  Show dependency tree
 
Reported: 2020-05-04 12:13 EDT by Lars Vogel CLA
Modified: 2022-01-18 06:27 EST (History)
6 users (show)

See Also:


Attachments
Screenshot (14.48 KB, image/png)
2020-05-04 12:13 EDT, Lars Vogel CLA
no flags Details
Screenhot for snippet (12.15 KB, image/png)
2020-05-04 12:34 EDT, Alexandr Miloslavskiy CLA
no flags Details
Screencast (57.80 KB, image/gif)
2020-05-12 06:30 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-05-04 12:13:13 EDT
Created attachment 282691 [details]
Screenshot

If I hover over a tree entry which is longer than the available space I get a hover after a while which is white. Screenshot attached.

Can this be fixed in SWT? I don't think it is related to our custom drawing in platform which we will soon disable / remove via Bug 562781.
Comment 1 Alexandr Miloslavskiy CLA 2020-05-04 12:34:26 EDT
Created attachment 282693 [details]
Screenhot for snippet

> Can this be fixed in SWT?

Apparently. It's a bit had to say what Eclipse is doing wrong, can you investigate?

Screenshot is obtained with this simple snippet:
----------------
OS.setTheme (true);

Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());

final Color backColor = new Color(display, 0x28, 0x28, 0x28);
final Color foreColor = new Color(display, 0xD0, 0xD0, 0xD0);

// Tree
{
	Tree tree = new Tree(shell, 0);
	final String itemText = "Item with very very very long text";

	for (int i = 0; i < 10; i++) {
		TreeItem item = new TreeItem(tree, 0);
		item.setText(itemText);

		for (int j = 0; j < 10; j++) {
			TreeItem item2 = new TreeItem(item, 0);
			item2.setText(itemText);
		}
	}

	tree.setBackground(backColor);
	tree.setForeground(foreColor);
}

shell.setSize(200, 200);
shell.open();
while (!shell.isDisposed()) {
	if (!display.readAndDispatch())
		display.sleep();
}
display.dispose();
----------------

The first thing I would look into is 'tree.setBackground()'
Comment 2 Lars Vogel CLA 2020-05-05 02:58:30 EDT
Thanks Alexandr, I will first fix Bug 562781 and afterwards try to analyse what we are doing wrong.

Btw. are you using the Eclipse IDE for your SWT development?
Comment 3 Alexandr Miloslavskiy CLA 2020-05-05 09:37:06 EDT
No, I'm using Intellij IDEA.
Comment 4 Lars Vogel CLA 2020-05-05 09:59:52 EDT
(In reply to Alexandr Miloslavskiy from comment #3)
> No, I'm using Intellij IDEA.

Sorry, to hear, I'm sure Eclipse IDE dark theme would hugely improve if you would be using it for a while..... :-)

Thanks again for your help.
Comment 5 Alexandr Miloslavskiy CLA 2020-05-05 10:31:38 EDT
I doubt my boss will say "please put our product problems aside and solve coloring issues in Eclipse" :)
Comment 6 Lars Vogel CLA 2020-05-07 03:35:26 EDT
Adding Mike, as he may have seen and solved this in his Eclipse based IDE.
Comment 7 Mike Marchand CLA 2020-05-07 08:16:50 EDT
(In reply to Lars Vogel from comment #6)
> Adding Mike, as he may have seen and solved this in his Eclipse based IDE.

Unfortunately this is still an outstanding issue in our IDE's dark theme as well.
Comment 8 Lars Vogel CLA 2020-05-12 06:30:43 EDT
Created attachment 282795 [details]
Screencast

Which method is called on the mouse hover so that I can debug this?
Comment 9 Niraj Modi CLA 2022-01-18 06:27:11 EST

*** This bug has been marked as a duplicate of bug 567616 ***