Bug 169916 - make strikethrough font optional and consider supporting on non-win32 platforms
Summary: make strikethrough font optional and consider supporting on non-win32 platforms
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 with 1 vote (vote)
Target Milestone: 3.1   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, noteworthy
: 217619 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-08 20:06 EST by Gerry CLA
Modified: 2008-09-28 17:56 EDT (History)
4 users (show)

See Also:


Attachments
striketrough look (45.96 KB, image/png)
2007-01-22 13:41 EST, Eugene Kuleshov CLA
no flags Details
Very hard to read text (6.71 KB, image/png)
2007-02-01 20:09 EST, Gerry CLA
no flags Details
standard settings for strikeout font styles (15.39 KB, image/png)
2008-01-09 14:36 EST, Eugene Kuleshov CLA
no flags Details
Font chooser on GTK (23.21 KB, image/png)
2008-01-09 18:12 EST, Steffen Pingel CLA
no flags Details
striketrough in the task editor (39.96 KB, image/jpeg)
2008-01-09 19:35 EST, Eugene Kuleshov CLA
no flags Details
styled text example (12.00 KB, text/plain)
2008-01-09 19:49 EST, Eugene Kuleshov CLA
no flags Details
sample tool on GTK (12.46 KB, image/png)
2008-01-09 20:14 EST, Steffen Pingel CLA
no flags Details
mylyn/context/zip (5.04 KB, application/octet-stream)
2008-02-19 00:30 EST, Mik Kersten CLA
no flags Details
Patch (4.01 KB, patch)
2008-02-22 17:39 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (11.49 KB, application/octet-stream)
2008-02-22 17:39 EST, Frank Becker CLA
no flags Details
updated patch (3.25 KB, patch)
2008-09-23 00:10 EDT, Frank Becker CLA
no flags Details | Diff
updated patch (3.25 KB, patch)
2008-09-23 00:23 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (15.48 KB, application/octet-stream)
2008-09-23 00:23 EDT, Frank Becker CLA
no flags Details
complete Implementation (12.28 KB, patch)
2008-09-24 15:07 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (22.05 KB, application/octet-stream)
2008-09-24 15:07 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerry CLA 2007-01-08 20:06:36 EST
Build ID: M20060629-1905

Steps To Reproduce:
Try to read the title text of one of your complete tasks in the "Task List".

More information:
It make sense to have it light grey and striked during normal circumstances; however when trying to copy the context from a completed task, this is a real nuisance and significantly increases the time required to find the correct task. It would be great if the text of completed tasks would change back to black on white with no strike though while the user has their mouse over it.

Currently I often find myself changing the tasks back to Incomplete just so I can read it.

P.S. Love Mylar, great work!
Comment 1 Matt Chapman CLA 2007-01-09 09:48:37 EST
One for you Mik...
Comment 2 Mik Kersten CLA 2007-01-21 20:14:45 EST
Gerry: could you please attach a screenshot of this?  I find completed tasks easy enough to read, but this probably has to do with my screen font.
Comment 3 Eugene Kuleshov CLA 2007-01-21 20:23:30 EST
I also think that striketrough is hard to read in both Task List and the Search views.

Mik, can you please make it configurable trough Appearance / Colors and Fonts. So, it would be possible to change color and font style (i.e. disable striketrough).
Comment 4 Mik Kersten CLA 2007-01-22 12:36:06 EST
I'm not sure that I can make it optional via themes, because we have to create this font in code, but this may be possible, or we can create a custom preference.  Also, it would still be helpful for me to see a screenshot so that I get a sense of the problematic font, since we are using it as default.
Comment 5 Eugene Kuleshov CLA 2007-01-22 13:41:30 EST
Created attachment 57277 [details]
striketrough look

Mik, you can probably create a dummy font in appearance preferences and then copy its styles to the programmatically created font.

Anyways, here is the screenshot of striketrough in Task List and Search views.
Comment 6 Gerry CLA 2007-02-01 09:45:26 EST
Sorry Mik, haven't checked back on this in a while. I'll get you a screenshot when I get into work in the morning.

However I think by it's very nature it is supposed to be hard to read so they don't take away focus from the pending tasks. Any text which is light grey on a white background and striked-though is going to be harder to read than plain black text on white.

Now that I think of it, what would be even better than my original suggestion would be a toggle button to turn the completed task dulling on and off.
Comment 7 Mik Kersten CLA 2007-02-01 17:35:21 EST
Gerry, you've convinced me that a large part of our problem is the fact that the strikethrough font is too light.  I took a look at the Outlook 2003 and 2007 UI and their strikeghtough fonts look identical, except that they're darker.  So what I've done for now is to make the default color darker, and also added this color to our theme settings so that it can be configured by the user.

The reason that I'm shying away from making this a preference is that creating preferences often means that the root problem gets neglected (e.g. font was too light).  However, I'm going to leave this open in case anyone still finds the font unreadable to the point that they want to disable it.  A note of caution though: I worked with Mylar for at least a year before it had the strikethrough, and it makes the problem was that it takes a lot more effort to identify which tasks are completed and which aren't, even though we have the icon overlay.
Comment 8 Eugene Kuleshov CLA 2007-02-01 18:03:51 EST
Mik, I still would prefer to be able to disable striketrough. Sorry, but it just too many horizontal lines. It would be fine if you could striketrough just a bug id, but text should be readable.
Comment 9 Gerry CLA 2007-02-01 20:09:29 EST
Created attachment 58076 [details]
Very hard to read text

See attachment for my screenshot.

I'm not sure how well Eugene's idea would work in practice, it could be a good part solution to the problem, but there would still need to be some sort of dulling of the text so that it doesn't overwhelm the user, so the toggle button would still be needed for when you have to read though closed bugs.
Comment 10 Mik Kersten CLA 2007-06-08 17:21:20 EDT
Eugene: if you can give me a snippet for making the strikethrough go through just the ID I could try that.  For local tasks it would probably have to go through the whole task though.
Comment 11 Eugene Kuleshov CLA 2007-06-08 17:37:43 EDT
Strike my previous comment. I am now much more interested to get rid of those striketroughs, especially on search results.

Besides, I don't think tree widget allows to decorate part of text label without getting into custom drawing.
Comment 12 Mik Kersten CLA 2007-06-08 17:48:57 EDT
The strikethrough is a very visible thing but this bug report has been the only case where this has been brought up.  So I'm not yet sure if it is worth adding an option for this.  The tooltips help, but I do realize that in the Search view (or another part of the UI that could be geared towards showing completed stuff) the current thing is suboptimal.  But for the Task List my understanding of user feedback is that it is still best.  

Eugene: you could consider adding preference to the Sandbox for this.  I think I'll create another Sandbox feature called "Experimental UI" or "UI Tweaks" where this kind of stuff makes sense to try out.
Comment 13 Eugene Kuleshov CLA 2007-06-08 17:56:54 EDT
(In reply to comment #12)
> But for the Task List my understanding of user feedback is that it is still best.

That is not what I read from Gerry's comments. 
I may live with striketrough showing on tasks with guaranteed visibility, but when using quickfind it is rather interfering then useful.

> Eugene: you could consider adding preference to the Sandbox for this.  I think
> I'll create another Sandbox feature called "Experimental UI" or "UI Tweaks"
> where this kind of stuff makes sense to try out.

That would be better then nothing.
Comment 14 Eugene Kuleshov CLA 2007-12-14 01:14:27 EST
BTW, the suggested setting should be in General / Appearance / Colors and Fonts, but the code still have to be in the task.ui. So, I am not sure if it does make sense for sandbox here.
Comment 15 Mik Kersten CLA 2008-01-09 13:31:13 EST
 (In reply to comment #14)
> BTW, the suggested setting should be in General / Appearance / Colors and Fonts,
> but the code still have to be in the task.ui. So, I am not sure if it does make
> sense for sandbox here.

I don't see how we can make strikethrough work via Colors and Fonts, so if that's possible please suggest an implementation approach.  Other than that I think that putting it in the Sandbox is the best approach for now.
Comment 16 Eugene Kuleshov CLA 2008-01-09 14:36:16 EST
Created attachment 86499 [details]
standard settings for strikeout font styles

Mik, strikeout is actually a standard font style. So, all you need to do is to allow to configure font for hyperlinks like that under Appearance preferences
Comment 17 Steffen Pingel CLA 2008-01-09 14:56:19 EST
Unfortunately that won't work on Linux.
Comment 18 Eugene Kuleshov CLA 2008-01-09 15:02:46 EST
(In reply to comment #17)
> Unfortunately that won't work on Linux.

Which is fine because there is no strikeout on Linux anyways, isn't it? So far strikeout been pushed out into all Windows users and there is no option to turn it off for Task List and Search results and now it is siggested for the Task Editor. 

Note that on small fonts, numbers 3, 6, 8, 9, 0 look very alike when stricken out and it require additional effort to read them.
Comment 19 Steffen Pingel CLA 2008-01-09 16:46:29 EST
Yes, that configuration option will work well for the task list. It won't work for the recently changed hyperlinks (bug 191726) though which do not use a font style to render the strike through but custom drawing. We would need some type of additional preference for these hyperlinks (at least for Linux).
Comment 20 Eugene Kuleshov CLA 2008-01-09 17:42:42 EST
Steffen, can you please attach screenshot of font chooser dialog from Linux?

There is also a hack that one could use a IThemePreview that would provide UI to change strikeout for selected fond data and accordingly update FontData.

I've done some digging and couldn't find API to store custom configuration under themes. There is a read-only API that allows to get arbitrary key/value pairs, but there is no editing capability for that. 

So the options are:

- request Platform to provide fond chooser that would have strikeout option 
- use a hack based on IThemePreview
- use proprietary setting configurable trough custom UI
Comment 21 Steffen Pingel CLA 2008-01-09 18:12:43 EST
Created attachment 86513 [details]
Font chooser on GTK
Comment 22 Mik Kersten CLA 2008-01-09 19:00:42 EST
 (In reply to comment #16)
> Mik, strikeout is actually a standard font style. So, all you need to do is to
> allow to configure font for hyperlinks like that under Appearance preferences

Last time I checked I couldn't make this approach work for a viewer, hence the reflective approach to setting strikethrough used in TaskListColorsAndFonts (see Platform bug 124551).  However, I just did another quick check and I was able to make strikethrough work as the style for view tabs, so perhaps this is now possible.  If we could make this part of the theme that would be great, so patch that shows this is welcome.

Leo: could you check if you can set a view tab to have a strikethrough font on Mac?  If so, and if the vifewer font can be themed, we could justify some 2.3/3.0 time on this in order to get strikethrough working on Mac.  
Comment 23 Steffen Pingel CLA 2008-01-09 19:06:37 EST
On Mac OS it's possible to select strike through in the font chooser dialog but it doesn't seem to have any effect. 

I'm fine with making the font for completed tasks part of the theme. I can implement a Sandbox tweak for non-Windows systems to explicitly activate strike-through for those using some type of rendering hack like in TaskListHyperlink.
Comment 24 Leo Dos Santos CLA 2008-01-09 19:14:22 EST
As Steffen's pointed out, playing with strikethrough in the Eclipse font preferences didn't have any effect.
Comment 25 Eugene Kuleshov CLA 2008-01-09 19:20:03 EST
(In reply to comment #22)
> Last time I checked I couldn't make this approach work for a viewer, 

Before sending my previous comment I verified to enable strikeout on for the "Task Editor - Notes and Comments" in the Appearance settings using Eclipse UI and it worked just fine.

If you decided to use theme settings, we'll need to introduce separate font configuration for completed tasks. Then it would be possible to use that font when rendering hyperlinks on windows. I can look at the patch for that or I can look at the patch that would use proprietary setting and sandbox UI.
Comment 26 Eugene Kuleshov CLA 2008-01-09 19:35:00 EST
Created attachment 86521 [details]
striketrough in the task editor

(In reply to comment #24)
> As Steffen's pointed out, playing with strikethrough in the Eclipse font
> preferences didn't have any effect.

Ugh. On what platform?
Comment 27 Leo Dos Santos CLA 2008-01-09 19:37:42 EST
On Mac OS X. I should have been clearer.
Comment 28 Eugene Kuleshov CLA 2008-01-09 19:49:07 EST
Created attachment 86522 [details]
styled text example

By the way, can you try this little app on linux and mac? It is using StyledText, which is practically the same as TextViewer or SourceViewer that I've been suggesting so this soultion should be more portable in regards to strikeout, hyperlinks and other text decoration.
Comment 29 Steffen Pingel CLA 2008-01-09 20:14:40 EST
Created attachment 86526 [details]
sample tool on GTK

All font styles seem to work with the sample tool on Linux :).
Comment 30 Mik Kersten CLA 2008-01-31 22:10:48 EST
Good to see progress on this, I would love to see this strikethrough style (or lack thereof) be consistent across platforms.  Note that afaik strikethroughs always rendered in StyledText and the like, but when I first did this I could not get them to rendered within tree and table viewers without use of win32 natives (bug 124551).  But the fact that they render in the view tabs is promising.
Comment 31 Eugene Kuleshov CLA 2008-01-31 23:26:17 EST
(In reply to comment #30)
> ...render in the view tabs...

Mik, you referred to this few times before. Can you please clarify what did you meant by that?

Comment 32 Steffen Pingel CLA 2008-02-01 00:51:13 EST
It's a font setting under Colors and Fonts: View and Editor Folders > Part Title Font.
Comment 33 Eugene Kuleshov CLA 2008-02-01 15:56:56 EST
I see, but aren't those are custom tabs? If so, what does it prove?
Comment 34 Mik Kersten CLA 2008-02-05 12:21:49 EST
 (In reply to comment #33)
> I see, but aren't those are custom tabs? If so, what does it prove?

As per comment#22, unfortunately it does not prove anything.  I said perhaps it's now possible if tabs use any underlying native widget or label, but I'm not sure how likely it is that they do.  So unless someone can demonstrate that strikethrough style can be used in a viewer, we are back to where we were with the custom win32 code.  If that's the case, I suggest the following:
1) We custom draw the strikethrough on non-win32 platforms
2) We make the use of strikethrough a Mylyn preference

If we don't do (1) I would like to do (2) in the Sandbox in order to avoid adding another preference, since use of strikethrough is not uncommon on Windows.  If we do (1) I think that we will probably need to make it a Task List preference because other platforms strikethrough is not as common.  In general I'm strongly in favor of (1) because this lack of consistency between platforms has always pained me, and because strikethrough provides an instant visual cue on whether a task is complete (whereas a gray foreground color is a more subtle cue).

Thoughts?
Comment 35 Mik Kersten CLA 2008-02-05 12:22:07 EST
*** Bug 217619 has been marked as a duplicate of this bug. ***
Comment 36 Eugene Kuleshov CLA 2008-02-05 12:58:42 EST
(In reply to comment #34)
> ... since use of strikethrough is not uncommon on Windows.

Mik, do you have examples of windows apps other then Ms Outlook that make heavy use of the striketrough?

Anyways, it would be really great to have a preference that would allow to disable striketrough decoration.

It also might be a good idea to review decoration strategy used for completed tasks, i.e. consider some alternatives, for example use "checkbox" icon decoration for completed tasks (it would also allow to use something like question mark icon when task completion status is unknown).
Comment 37 Mik Kersten CLA 2008-02-19 00:30:01 EST
Frank: are you interested in trying to apply your strikethrough line drawing to the Task List view (as per comment#34)?  The right place to do it would likely be CustomTaskListDecorationDrawer.  You'll note that we have some platform-specific code in there, but you could just make it work for one platform and we would tweak it for the others if needed.  If the platform you work on is Windows you'd first want to disable the native strikethrough code in TaskListColorsAndFonts (see attached context).
Comment 38 Mik Kersten CLA 2008-02-19 00:30:26 EST
Created attachment 90020 [details]
mylyn/context/zip
Comment 39 Frank Becker CLA 2008-02-19 02:08:10 EST
 (In reply to comment #37)
> Frank: are you interested in trying to apply your strikethrough line drawing to
> the Task List view (as per comment#34)?  The right place to do it would likely
> be CustomTaskListDecorationDrawer.  You'll note that we have some
> platform-specific code in there, but you could just make it work for one
> platform and we would tweak it for the others if needed.  If the platform you
> work on is Windows you'd first want to disable the native strikethrough code in
> TaskListColorsAndFonts (see attached context).

Yes I can try to start next weekend.

By envrioment is Mac OS X and with VMWare I can run Win XP so I hope that I can test both cases.
Comment 40 Frank Becker CLA 2008-02-22 17:39:23 EST
Created attachment 90529 [details]
Patch

This Patch was test on a MacBook Pro.

I removed the platform-specific code for the tasklist.

Now that we have that patch we can define a special Color for the strikethrough line and change the Foreground Color.

Thoughts?
Comment 41 Frank Becker CLA 2008-02-22 17:39:25 EST
Created attachment 90530 [details]
mylyn/context/zip
Comment 42 Mik Kersten CLA 2008-02-26 12:58:39 EST
Rob: please review.
Comment 43 Mik Kersten CLA 2008-06-12 19:07:49 EDT
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 44 Steffen Pingel CLA 2008-09-20 01:18:45 EDT
I'll take a look at the patch.
Comment 45 Steffen Pingel CLA 2008-09-22 22:04:25 EDT
Frank, I get conflicts when I try to apply the patch. Sorry for letting it go stale. Would you have time to recreate it against head? If not, I'll look into it next week.
Comment 46 Frank Becker CLA 2008-09-23 00:10:45 EDT
Created attachment 113215 [details]
updated patch

Sorry during creation of this patch I found that here is only on part of the patch.

ToDo:
- make strikethrough font optional
  Sorry I did not implement this until now. I hope that I can do this tomorrow evening. Is this OK? If not feel free to implement the missing part.
Comment 47 Frank Becker CLA 2008-09-23 00:23:55 EDT
Created attachment 113219 [details]
updated patch

Sorry during creation of this patch I found that here is only on part of the patch.

ToDo:
- make strikethrough font optional
  Sorry I did not implement this until now. I hope that I can do this tomorrow evening. Is this OK? If not feel free to implement the missing part.
Comment 48 Frank Becker CLA 2008-09-23 00:23:58 EDT
Created attachment 113220 [details]
mylyn/context/zip
Comment 49 Steffen Pingel CLA 2008-09-23 01:49:20 EDT
No hurry, I'll wait for the final patch.
Comment 50 Frank Becker CLA 2008-09-24 15:07:46 EDT
Created attachment 113405 [details]
complete Implementation

Hope that this is that what you need.
Comment 51 Frank Becker CLA 2008-09-24 15:07:52 EDT
Created attachment 113406 [details]
mylyn/context/zip
Comment 52 Steffen Pingel CLA 2008-09-24 17:02:05 EDT
The patch works really well on Linux! I'll do some more testing and apply if I don't run into any problems. I wonder if we should keep using the strikethrough style on Windows or if it's better to have a consistent implementation that does not rely on internals and works on all platforms?
Comment 53 Steffen Pingel CLA 2008-09-28 17:56:50 EDT
I have applied the patch with minor modifications. The custom drawing code for the task list is only used on non-Windows platforms to keep strikethrough in dialogs that use the TaskElementLabelProvider on Windows. Since there has been little interest in making this a preference I have moved the setting to disable strikethrough to the preference page of the UI experiments feature.