Bug 563496 - Enable selection highlighter in dark theme
Summary: Enable selection highlighter in dark theme
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.16   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.17 M1   Edit
Assignee: Pierre-Yves Bigourdan CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 497586
Blocks: 563540
  Show dependency tree
 
Reported: 2020-05-23 05:25 EDT by Pierre-Yves Bigourdan CLA
Modified: 2020-07-21 14:48 EDT (History)
7 users (show)

See Also:


Attachments
Bottom selection highlight on active CTabFolder (49.41 KB, image/png)
2020-05-23 05:25 EDT, Pierre-Yves Bigourdan CLA
no flags Details
Screenshot (281.73 KB, image/png)
2020-06-18 05:02 EDT, Lars Vogel CLA
no flags Details
Tabs in multipage editor (143.41 KB, image/png)
2020-06-18 05:04 EDT, Lars Vogel CLA
no flags Details
Tabs in multipage editor with different view selected (153.57 KB, image/png)
2020-06-18 05:05 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Yves Bigourdan CLA 2020-05-23 05:25:22 EDT
Created attachment 282996 [details]
Bottom selection highlight on active CTabFolder

Bug 497586 allows Platform users to define a selection highlighter via underscore on selected tabs. This is configurable via two CSS properties, swt-selected-tab-highlight and swt-selected-highlight-top.

Should this new feature be enabled in some of the IDE's default themes? In particular, the dark theme comes to mind: the selected tab and active part are harder to see with dark colours.
Comment 1 Eclipse Genie CLA 2020-05-23 05:28:17 EDT
New Gerrit change created: https://git.eclipse.org/r/163459
Comment 2 Lars Vogel CLA 2020-05-23 07:36:06 EDT
I think in 4.17 we can try to use it in the dark theme, for light theme we should wait for feedback.
Comment 3 Matthias Becker CLA 2020-05-27 01:57:37 EDT
(In reply to Lars Vogel from comment #2)
> I think in 4.17 we can try to use it in the dark theme, for light theme we
> should wait for feedback.

I like this very much.
Comment 4 Andrew Obuchowicz CLA 2020-05-29 07:50:24 EDT
+1 from me :)

Also, this patch could go nicely with Bug 563282 (which would need OSX and GTK equivalent patches too).

I might be a bit particular, but I'd personally love to have the option to define the active tab highlight's colour from the Appearance preferences. This way, we can use a standard color (eg. Blue) and those who dislike this color choice can use another color. My reasoning is that I use a GTK theme that does not use blue for selected items (it uses red instead), so hard-coding the highlight to be blue (or any color) would be incovenient and required a custom theme to conform.
Comment 5 Andrew Obuchowicz CLA 2020-05-29 07:51:08 EDT
> I might be a bit particular, but I'd personally love to have the option to
> define the active tab highlight's colour from the Appearance preferences.

And it's implied that I'd be willing to provide a gerrit for this ;)
Comment 6 Mike Marchand CLA 2020-05-29 08:32:50 EDT
I've never been a fan of the big visual difference for the focused view.  Mostly because of the large number of inconsistencies and issues that are caused by all the CSS.  I don't think I am entirely alone in this, which is probably why dark theme has significantly reduced the total number of different colors and varying states in the workbench.

What I like most about this idea is that its subtle enough to indicate which part is focused without trying to change the all the colors and presentation of the view.
Comment 7 Mike Marchand CLA 2020-05-29 08:34:42 EDT
+1 from me, in case my comment wasn't clear enough
Comment 8 Pierre-Yves Bigourdan CLA 2020-05-30 06:05:11 EDT
(In reply to Andrew Obuchowicz from comment #4)
> I might be a bit particular, but I'd personally love to have the option to
> define the active tab highlight's colour from the Appearance preferences.
> This way, we can use a standard color (eg. Blue) and those who dislike this
> color choice can use another color. My reasoning is that I use a GTK theme
> that does not use blue for selected items (it uses red instead), so
> hard-coding the highlight to be blue (or any color) would be incovenient and
> required a custom theme to conform.

There already are a few customisations options for tabs in General -> Appearance -> Colors and Fonts -> View and Editor Folders. The new preference you're talking about would probably fit there well. Or maybe Bug 563282 is a more powerful alternative.
Comment 9 Lars Vogel CLA 2020-06-03 05:07:19 EDT
Lets start with the dark theme with this bug
Comment 10 Andrew Obuchowicz CLA 2020-06-15 13:09:04 EDT
> There already are a few customisations options for tabs in General ->
> Appearance -> Colors and Fonts -> View and Editor Folders. The new
> preference you're talking about would probably fit there well.

Agreed :) I think it'd be nice to make a new color preference for this (which I'm currently doing in my own theme). 

> Or maybe Bug 563282 is a more powerful alternative.

Bug 563282 would be nice to have, although maybe we could make it so that when the "System Default" button is pressed for the (future) selected tab color preference, the accent color gets used. This way users could change the selected tab color to their preference, or have it use their OS' accent color by default.

All of this stuff can be for a followup bug after this bug is closed.
Comment 12 Lars Vogel CLA 2020-06-17 10:29:40 EDT
Thank you all for enabling this.

Opened Bug 564380 to enable this also for the light theme.

Please add to N&N.
Comment 13 Andrew Obuchowicz CLA 2020-06-17 10:31:00 EDT
Thanks Pierre-Yves for the patch!

Now that this is merged, there are some things to consider:

- We should probably make a new bug to create a color preference to change the active tab highlight color. I can guide whoever wants to work on this patch as I'm somewhat familiar with the process involved.

- We should look into Bug 563282 for OSX and GTK. Maybe the system default color for the highlight should be the OS accent color?

- We shoud look into Bug 502581 which would allow users to change the active tab highlight color (and more) without fear of adding to many preference options.
Comment 14 Lars Vogel CLA 2020-06-18 05:02:38 EDT
Created attachment 283330 [details]
Screenshot

If I use a multi page editor the selected tab stays highlighted, even if I switch to another view / editor. Is this intended?
Comment 15 Lars Vogel CLA 2020-06-18 05:04:40 EDT
Created attachment 283331 [details]
Tabs in multipage editor
Comment 16 Lars Vogel CLA 2020-06-18 05:05:50 EDT
Created attachment 283332 [details]
Tabs in multipage editor with different view selected
Comment 17 Pierre-Yves Bigourdan CLA 2020-06-18 05:08:26 EDT
I don't think this is intended. Will have a look tonight or during the weekend.
Comment 18 Andrew Obuchowicz CLA 2020-06-18 12:02:54 EDT
(In reply to Lars Vogel from comment #14)
> Created attachment 283330 [details]
> Screenshot
> 
> If I use a multi page editor the selected tab stays highlighted, even if I
> switch to another view / editor. Is this intended?

Although this might not be intended, one could argue it is aligned with the existing behavior of the multi page editor tabs: they stay selected even if the view containing them isin't in focused.

In other words, if you have a page open ina  multi page editor, then click on another view, and then click on the multi page editor view, the tab will not change.

With that being said, I don't mind having this fixed (but I also am OK with the existing behavior)
Comment 19 Pierre-Yves Bigourdan CLA 2020-06-19 03:11:40 EDT
(In reply to Andrew Obuchowicz from comment #18)
> In other words, if you have a page open ina  multi page editor, then click
> on another view, and then click on the multi page editor view, the tab will
> not change.

You have a point, however could there be cases where the tab folder in on the bottom without a parent one, i.e. not a multi page editor view?


Unfortunately, I can't seem able to fix it. I'm trying to use a CSS attribute that mixes pseudo classes and styles bits, that doesn't seem to work:
CTabFolder[style~='SWT.DOWN'][style~='SWT.BOTTOM'].active {
  ...
}

We need to capture both "is active" and "is bottom" tab folder. Any ideas?
Comment 20 Lars Vogel CLA 2020-06-19 06:51:37 EDT
The selection of the bottom tab via the blue highlighter grew on me, and now I like it. Lets see if other users complain and rethink the solution if they do.

N&N is still missing.
Comment 21 Pierre-Yves Bigourdan CLA 2020-06-23 12:57:06 EDT
(In reply to Lars Vogel from comment #20)
> N&N is still missing.

Will prepare that over the weekend.
Comment 22 Eclipse Genie CLA 2020-06-27 06:18:08 EDT
New Gerrit change created: https://git.eclipse.org/r/165524
Comment 23 Andrew Obuchowicz CLA 2020-06-29 00:06:03 EDT
N&N entry is now merged. Thanks Pierre-Yves!