Bug 545406 - [GTK3] Text: order of setBackground/setForeground matters
Summary: [GTK3] Text: order of setBackground/setForeground matters
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.12 M1   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard: RHT
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-03-14 09:52 EDT by Thomas Singer CLA
Modified: 2019-04-09 09:59 EDT (History)
3 users (show)

See Also:


Attachments
Snippet to reproduce (645 bytes, text/x-java)
2019-03-14 09:52 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2019-03-14 09:52:13 EDT
Created attachment 277866 [details]
Snippet to reproduce

Please launch the attached snippet on Linux (I'm on CentOS 7.6, GTK 3.22.30, Adaita theme, SWT v4926r2). It will ignore the setForeground line and show black text on dark-gray background. But switching the order of the 2 setForeground/setBackground line makes it working.
Comment 1 Eric Williams CLA 2019-03-14 10:32:34 EDT
I can reproduce the issue.
Comment 2 Eric Williams CLA 2019-03-14 10:58:55 EDT
Looks like Text.getForeground() is returning an incorrect color, I'll invesitgate further.
Comment 3 Eclipse Genie CLA 2019-03-14 11:20:55 EDT
New Gerrit change created: https://git.eclipse.org/r/138739
Comment 5 Eric Williams CLA 2019-03-14 13:05:58 EDT
(In reply to Eclipse Genie from comment #4)
> Gerrit change https://git.eclipse.org/r/138739 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=ecc666275b3b7b87d3be7da23a89327dd32efdc4

In master now.
Comment 6 Alexander Kurtakov CLA 2019-03-15 02:23:00 EDT
(In reply to Eric Williams from comment #5)
> (In reply to Eclipse Genie from comment #4)
> > Gerrit change https://git.eclipse.org/r/138739 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > ?id=ecc666275b3b7b87d3be7da23a89327dd32efdc4
> 
> In master now.

Eric, this looks possible to become proper junit test. Would you please do so?
Comment 7 Alexander Kurtakov CLA 2019-03-15 02:23:27 EDT
Thomas, you can do it too.
Comment 8 Eric Williams CLA 2019-03-15 08:57:24 EDT
(In reply to Alexander Kurtakov from comment #6)
> (In reply to Eric Williams from comment #5)
> > (In reply to Eclipse Genie from comment #4)
> > > Gerrit change https://git.eclipse.org/r/138739 was merged to [master].
> > > Commit:
> > > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > > ?id=ecc666275b3b7b87d3be7da23a89327dd32efdc4
> > 
> > In master now.
> 
> Eric, this looks possible to become proper junit test. Would you please do
> so?

There is a JUnit test in the patch. :)
Comment 9 Alexander Kurtakov CLA 2019-03-15 09:15:11 EDT
Ooops sorry, I saw the manual one and went to conclusion - a wrong one!
Comment 10 Lakshmi P Shanmugam CLA 2019-04-08 06:11:50 EDT
The new test fails on Mac at Line 1166. Opened Bug 546192 to track it.
Comment 11 Eric Williams CLA 2019-04-09 09:59:25 EDT
Verified in I20190409-0600.