Bug 176669 - use cool RSS Owl category shading
Summary: use cool RSS Owl category shading
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Benjamin Pasero CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 178735
Blocks:
  Show dependency tree
 
Reported: 2007-03-07 22:17 EST by Mik Kersten CLA
Modified: 2007-04-30 13:47 EDT (History)
2 users (show)

See Also:


Attachments
Patch showing UI impact (7.56 KB, patch)
2007-03-13 19:38 EDT, Benjamin Pasero CLA
no flags Details | Diff
mylar/context/zip (1.19 KB, application/octet-stream)
2007-03-14 01:31 EDT, Mik Kersten CLA
no flags Details
Image showing gradient grouping for Mylar (34.86 KB, image/png)
2007-03-16 06:34 EDT, Benjamin Pasero CLA
no flags Details
mylar/context/zip (7.50 KB, application/octet-stream)
2007-03-16 20:33 EDT, Mik Kersten CLA
no flags Details
Collapsed Groups in RSSOwl (3.31 KB, image/png)
2007-03-19 05:10 EDT, Benjamin Pasero CLA
no flags Details
mylar/context/zip (18.41 KB, application/octet-stream)
2007-03-21 20:47 EDT, Mik Kersten CLA
no flags Details
mylar/context/zip (21.30 KB, application/octet-stream)
2007-03-30 21:15 EDT, Mik Kersten CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2007-03-07 22:17:52 EST
Source is here: http://sourceforge.net/svn/?group_id=86683
Comment 2 Eugene Kuleshov CLA 2007-03-08 14:00:19 EST
What is it about?
Comment 3 Mik Kersten CLA 2007-03-12 21:03:54 EDT
I should have clarified what this is about in the description, but Benjamin and I did this quickly while we were chatting.  He has custom-drawn category separators that use a gradient similar to table heading gradients in RSS Owl 2.0 that could improve the visual separation of categories/queries in the Task List.
Comment 4 Eugene Kuleshov CLA 2007-03-12 21:14:45 EDT
Sorry for the dumb questions, but what are the "table heading gradients"? Anyhow, I hope you would make those gradients configurable in colors/fonts settings...
Comment 5 Benjamin Pasero CLA 2007-03-13 19:37:53 EDT
The attached patch is giving the desired results, however its not complete yet. I think the new OwnerDrawLabelProvider is not compatible with DecoratingLabelProvider because its not a subclass of ILabelProvider (I will ask Tom about this when he is back online). Thats why for now I am just using SWT. The patch is meant to give you the UI impact of this change.
Comment 6 Benjamin Pasero CLA 2007-03-13 19:38:11 EDT
Created attachment 60754 [details]
Patch showing UI impact
Comment 7 Robert Elves CLA 2007-03-13 19:48:10 EDT
Cool effect!
Comment 8 Mik Kersten CLA 2007-03-14 01:31:00 EDT
Eugene: one of the key benefits of this is that it allows the separators to be visually distinct on platforms that use an alternate white/gray background color of table rows.  GTK does this.  I have been tempted to force white shading, but we have the principle of avoiding a break from platform-specific look and feel whenever possible.  Another benefit I think this will provide is better visual distinction and a cleaner look, but we'll have to experiment some to make sure that's the case.

Benjamin: let me know if you learn anything about making DecoratingLabelProvider work in this way.  Otherwise we may need to do a trick with making the TaskListTableLabelProvider be a special ILabelProvider that delegates to the DecoratingLabelProvider (I have a vague recollection that such an approach could make getting platform decorations difficult).  Context with the key classes attached.
Comment 9 Mik Kersten CLA 2007-03-14 01:31:03 EDT
Created attachment 60765 [details]
mylar/context/zip
Comment 10 Benjamin Pasero CLA 2007-03-14 09:27:31 EDT
I just chatted with Tod and he told me that for 3.3 you wont be able to use the new Viewer API with the decorating label provider. They plan to revisit this in 3.4 (I guess they ran out of time). 

For now (and 3.3), you might have to use the SWT only approach if you want the gradients.
Comment 11 Eugene Kuleshov CLA 2007-03-16 02:49:23 EDT
Can you post a screenshot of how it look like?

BTW, for separating categories, it actually would make sense to do a bit of custom table row rendering to show category label starting right next to the folder icon...
Comment 12 Benjamin Pasero CLA 2007-03-16 06:34:16 EDT
Created attachment 61076 [details]
Image showing gradient grouping for Mylar

Here you go.
Comment 13 Mik Kersten CLA 2007-03-16 14:14:31 EDT
Patch applied, colors adjusted slightly and added to our custom resource management for now.  I'm going to bootstrap on this to get a feel for the visual effect, and if it's working well the result will be in today's dev build.

Benjamin: this patch is working with platform label decorations and existing decorating label provider.  Is there something else that you wanted to do with the new viewer API that's outside the current patch?

Eugene: I agree that it would be a lot better if we could stop rendering the empty columns for the category/query separators.  Then the left offset of the text would also provide a nice visual separation.  Anyone know how to do that?
Comment 14 Eugene Kuleshov CLA 2007-03-16 15:19:55 EDT
 (In reply to comment #12)
> Created an attachment (id=61076)
> Image showing gradient grouping for Mylar
> Here you go.

Thanks Ben.

Now. My first impression - cool but weird. :-)
Perhaps primarily because I have UI gradients turned off everywhere. But even on your screenshot currently selected entry is off the style with those gradients.

As a side note. Those gradients don't really work too good when you creating screenshots for web publishing... So, please allow to disable this feature (i.e. make start and end colors configurable - so I can set them to the same value).
Comment 15 Eugene Kuleshov CLA 2007-03-16 15:22:00 EDT
 (In reply to comment #13)
> Eugene: I agree that it would be a lot better if we could stop rendering the
> empty columns for the category/query separators.  Then the left offset of the
> text would also provide a nice visual separation.  Anyone know how to do that?

There is a snippet in swt examples at http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet239.java?view=co

I've tried it at some point and almost got it working, but not quite right, so I had to drop it because it required some deep digging. Ben probably has more experience with this level of SWT use.
Comment 16 Mik Kersten CLA 2007-03-16 20:32:42 EDT
I made the start and end of the gradient shading configurable via themes, so if anyone prefers the flat look they can set the start and end color to be the same color.

Benjamin: thanks again for the contribution, I think that we will use this as the default mode thanks to the extra visual separation that it provides, and because it matches the default XP theme, the newer Linux themes and Mac OS.  It also looks good on Vista, which has a similar gradient for table headers.

Eugene: please file a new bug report for the improved category cell rendering suggestion.
Comment 17 Mik Kersten CLA 2007-03-16 20:33:22 EDT
Done.
Comment 18 Mik Kersten CLA 2007-03-16 20:33:24 EDT
Created attachment 61179 [details]
mylar/context/zip
Comment 19 Benjamin Pasero CLA 2007-03-17 08:10:17 EDT
Just gave it a try, looks cool :). 

@Eugene: I was noticing that the selection is looking a bit weird compared to the gradient. Would be interesting what Vista is doing here, e.g. does it show a gradient for selections too?

@Mik: There is a couple of nice things about the new Viewer API worth looking at. There is the JFace tool-tip support that can easily be defined from the LabelProvider (I am not too happy with the behavior of the current tooltip, e.g. its too close to the mouse-cursor; just compare with a native tooltip position). Others than that, for the Custom Owner Drawn support we will have to wait till 3.4. 


Please CC me to the bug about letting the category text span multiple columns, I think that makes perfect sense here.
Comment 20 Eugene Kuleshov CLA 2007-03-17 15:49:23 EDT
 (In reply to comment #19)
> Please CC me to the bug about letting the category text span multiple columns, I
> think that makes perfect sense here.

created new bug 177911 for that
Comment 21 Mik Kersten CLA 2007-03-18 22:28:00 EDT
Benjamin: Yes, our custom tooltips need improving.  I'm assuming that we will have to make the tweaks on our end until we can use the new viewer API, but if you have any other suggestions let us know.

I've used the new gradient categories for a couple of days now and I think that we can make them the default :)  They look a bit weird when you have a bunch of categories and everything is collapsed, but it's rare to get into that mode when working.

There's just one problem: the selection of categories is a bit broken with the new support, at least on Vista, where it's only the first column that gets the selection higlighting.  Are you guys are seeing that on XP?  (fyi, yes, Vista does show a gradient for selections, and it's almost idnetical to the current category shading gradient other than having the selection color)


Comment 22 Benjamin Pasero CLA 2007-03-19 05:09:57 EDT
(In reply to comment #21)
> Benjamin: Yes, our custom tooltips need improving.  I'm assuming that we will
> have to make the tweaks on our end until we can use the new viewer API, but if
> you have any other suggestions let us know.
> 
> I've used the new gradient categories for a couple of days now and I think that
> we can make them the default :)  They look a bit weird when you have a bunch of
> categories and everything is collapsed, but it's rare to get into that mode
> when working.

Right. I noticed you are just using 2 colors (gradient start and end), while I am additionally putting a darker separator line at the end of the gradient. That makes the case where all gradients are collapsed look a bit better imho (see attachment).

> 
> There's just one problem: the selection of categories is a bit broken with the
> new support, at least on Vista, where it's only the first column that gets the
> selection higlighting.  Are you guys are seeing that on XP?  (fyi, yes, Vista
> does show a gradient for selections, and it's almost idnetical to the current
> category shading gradient other than having the selection color)
> 

Please try tomorrows IBuild (even last weeks IBuild should be fine), I was frequently talking to Steve about Custom Owner Drawn problems on Vista with my gradients. Every issue should have been fixed by now.
Comment 23 Benjamin Pasero CLA 2007-03-19 05:10:52 EDT
Created attachment 61259 [details]
Collapsed Groups in RSSOwl
Comment 24 Robert Elves CLA 2007-03-20 15:10:56 EDT
It appears that by adding the SWT.EraseItem listener to draw these gradients we've broken drag and drop support.
Comment 25 Benjamin Pasero CLA 2007-03-21 08:10:07 EDT
Interesting. I doubt (actually hope not) SWT.EraseItem is the reason for this, but I will have a look later today.
Comment 26 Benjamin Pasero CLA 2007-03-21 17:11:06 EDT
This is one of the weirdest things I have seen in a while. Indeed, just adding the SWT.EraseItem listener (the impl does not play any role) makes DND stop working. I tried the same thing in a Snippet and was unable to reproduce. 

Will debug a bit more tomorrow, but I am already looking into this for more than an hour...
Comment 27 Eugene Kuleshov CLA 2007-03-21 17:39:10 EDT
BTW, I also noticed some performance impact of this feature when Task List is being refreshed. I wonder if this thing should use old behavior if begin and end colors for the gradient are the same.
Comment 28 Mik Kersten CLA 2007-03-21 20:45:41 EDT
Reopening so that we can investigate these issues.  

I think that I fixed what was probably the performance issue, calling the theme manager within handleEvent(..).  I also added the suggested optimization of removing the erase listener if the colors are the same.  This is all now encapsualted by the udpateGradientColors() method and the CATEGORY_GRADIENT_DRAWER class.  Eugene: if you could put gradients back and note whether you see any performance problems that would be helpful.

The showstopper is the DnD problem.  The odd thing is that I've never seen it fail onmy Vista machine with I20070321-1300.  But it not seem to work with that build on Rob's XP machine.  Benjamin: I understand if you're maxed out on time for this, but if you have any hints that would be great.
Comment 29 Mik Kersten CLA 2007-03-21 20:47:36 EDT
Created attachment 61624 [details]
mylar/context/zip
Comment 30 Eugene Kuleshov CLA 2007-03-21 22:12:12 EDT
 (In reply to comment #28)
> Eugene: if you could put gradients back and
> note whether you see any performance problems that would be helpful.

Do we have a dev build with those changes?
Comment 31 Benjamin Pasero CLA 2007-03-22 04:05:51 EDT
I am able to reproduce in a Snippet now. Looks like DND stops working when you apply the listener and have Text in any column != 0. Filed Bug 178735.

@performance: I was noticing a slight performance decrease when scrolling the Tree with lots of items inside in rssowl, but was never able to come up with a performance test case. If you find something, its worth filing a bug vs. SWT. And yes, its crucial to do as minor work as possible in the paint listeners, since they might be called more often than expected. 
Comment 32 Mik Kersten CLA 2007-03-22 13:06:31 EDT
I can't see performance problems when scrolling after my last changes.  Eugene: if you see them please report.

Benjamin: thanks for investigating and filing that bug.  If it is not fixed for 3.3M6 we'll unfortunately have to pull this out of next Friday's Mylar 2.0M2.  Reopening and scheduling for M2 to make sure that this is addressed in one way or another and leaving in HEAD for now since I like it too much to go back just yet :)
Comment 33 Mik Kersten CLA 2007-03-30 21:15:48 EDT
Gradients temporarily disabled for Mylar 2.0M2 to enable drag-and-drop.  Will re-enable for next week's dev builds.
Comment 34 Mik Kersten CLA 2007-03-30 21:15:51 EDT
Created attachment 62585 [details]
mylar/context/zip
Comment 35 Mik Kersten CLA 2007-04-30 13:47:19 EDT
This will be in in 2.0M3.  Still some tweaking needed to with the shading and use of lines for a horizontal separation between the adjacent rows.