Community
Participate
Working Groups
Source is here: http://sourceforge.net/svn/?group_id=86683
Benjamin says: use eraseGroup from: http://rssowl.svn.sourceforge.net/viewvc/rssowl/plugins/org.rssowl.ui/trunk/src/org/rssowl/ui/internal/editors/feed/NewsTableLabelProvider.java?view=markup
What is it about?
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.
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...
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.
Created attachment 60754 [details] Patch showing UI impact
Cool effect!
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.
Created attachment 60765 [details] mylar/context/zip
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.
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...
Created attachment 61076 [details] Image showing gradient grouping for Mylar Here you go.
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?
(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).
(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.
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.
Done.
Created attachment 61179 [details] mylar/context/zip
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.
(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
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)
(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.
Created attachment 61259 [details] Collapsed Groups in RSSOwl
It appears that by adding the SWT.EraseItem listener to draw these gradients we've broken drag and drop support.
Interesting. I doubt (actually hope not) SWT.EraseItem is the reason for this, but I will have a look later today.
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...
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.
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.
Created attachment 61624 [details] mylar/context/zip
(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?
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.
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 :)
Gradients temporarily disabled for Mylar 2.0M2 to enable drag-and-drop. Will re-enable for next week's dev builds.
Created attachment 62585 [details] mylar/context/zip
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.