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

Bug 466486

Summary: Properly style PushResultDialog in dark theme
Product: [Technology] EGit Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Lars Vogel <Lars.Vogel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: fabiofz, Lars.Vogel, matthias.sohn
Version: unspecified   
Target Milestone: 4.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/47206
https://bugs.eclipse.org/bugs/show_bug.cgi?id=465672
https://git.eclipse.org/c/egit/egit.git/commit/?id=4247f7ff11b48b557322bfd51f476e838fe9553b
Whiteboard:
Attachments:
Description Flags
Screenshot none

Description Lars Vogel CLA 2015-05-05 14:48:30 EDT

    
Comment 1 Lars Vogel CLA 2015-05-05 14:49:59 EDT
SpellcheckableMessageArea is a Composite, so if it would override setBackground our CSS handler should pick it up. In this method we set also the backGround of the StyledText element.
Comment 2 Eclipse Genie CLA 2015-05-05 14:53:24 EDT
New Gerrit change created: https://git.eclipse.org/r/47206
Comment 3 Lars Vogel CLA 2015-05-05 14:54:39 EDT
(In reply to Eclipse Genie from comment #2)
> New Gerrit change created: https://git.eclipse.org/r/47206

Fabio, the setBackground method in SpellcheckableMessageArea is never called. This approach worked for HeapStatus and I can't find whats is wrong here. Any advice?
Comment 4 Fabio Zadrozny CLA 2015-05-05 15:26:12 EDT
Well, for some reason the styling engine doesn't always find all the objects for styling (such as in the JDT breadcrumb), so, the fix would be setting an ID and asking for a restyle (but this requires a new API -- which is what was missing on the JDT breadcrumb fix too) or you can see if you're able to write a CSS selector which is able to get to that, akin to what I did in the other egit fix: https://git.eclipse.org/r/#/c/46663/2/org.eclipse.egit.ui/css/e4-dark_egit_prefstyle.css (but this isn't always possible and depends on the use-case... I know it wasn't possible in the JDT breadcrumb, but worked for the other EGit issue).
Comment 5 Lars Vogel CLA 2015-05-05 17:52:14 EDT
(In reply to Fabio Zadrozny from comment #4)
> Well, for some reason the styling engine doesn't always find all the objects
> for styling (such as in the JDT breadcrumb), so, the fix would be setting an
> ID and asking for a restyle (but this requires a new API -- which is what
> was missing on the JDT breadcrumb fix too) or you can see if you're able to
> write a CSS selector which is able to get to that, akin to what I did in the
> other egit fix:
> https://git.eclipse.org/r/#/c/46663/2/org.eclipse.egit.ui/css/e4-
> dark_egit_prefstyle.css (but this isn't always possible and depends on the
> use-case... I know it wasn't possible in the JDT breadcrumb, but worked for
> the other EGit issue).

Via the CSS spy I found that the selector for the StyledText in the PushResultDialog is: PushResultTable-5 StyledText 

Gerrit review updated, not sure if "PushResultTable-5" is a stable selector. Fabio, can you test on Windows?
Comment 6 Fabio Zadrozny CLA 2015-05-05 18:28:33 EDT
Can you add a snapshot? -- So that I know where should I be looking at ;)
Comment 7 Lars Vogel CLA 2015-05-05 18:53:39 EDT
Stefan Winkler gave me the tip that PushResultTable-5 refers to an anonymous inner class, as the CSS engine replaces the $ with -.

I updated the Gerrit review with the change that I converted the anonymous inner class to an inner class. Screenshot to follow soon.
Comment 8 Lars Vogel CLA 2015-05-05 18:54:23 EDT
Created attachment 253195 [details]
Screenshot