Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows][Dark theme] Multiple preference pages use tab widgets, that are not dark theme aware #27

Open
pbalint opened this issue Jun 23, 2022 · 19 comments

Comments

@pbalint
Copy link

pbalint commented Jun 23, 2022

On Windows, multiple preference pages use tab widgets that are not dark theme-aware, thus stand out by using light colors:
(Checking with Spy++, the native Win32 widget they use is SysTabControl32)
image
image
image

While pages using dark theme-aware tab widgets use SWT_Window0-s
image

Ideally, the SWT/JFace widget should be fixed, affecting all of the affected dialogs. (And this is what the darkest dark plugin also does: it replaces all of the broken tab widgets)

@pbalint pbalint changed the title [Windows] Multiple preference pages use tab widgets, that are not dark theme aware [Windows][Dark theme] Multiple preference pages use tab widgets, that are not dark theme aware Jun 23, 2022
@jonahgraham
Copy link
Contributor

Thanks @pbalint for the bug report.

@Torbjorn-Svensson provided similar fixes for other UI in eclipse-platform/eclipse.platform.team#14 - so if that same way of fixing it can be applied here that would be great.

@betamaxbandit has also taken on dark mode fixes. @betamaxbandit this one be a good one to have a quick stab at.

@jonahgraham
Copy link
Contributor

@betamaxbandit has made the first PR for this (of the many that will be required to update all the UIs) in eclipse-jdt/eclipse.jdt.ui#126

@akurtakov
Copy link
Member

Is there a dedicated bug for Windows not supporting TabFolder theming? CTabFolder is significanlty heavier widget with far more issues than TabFolder so just switching everywhere is not the right approach, esp if the real issue "windows theming of TabFolder" is not even investigated.

@betamaxbandit
Copy link

Yes.
Bug 566359 - [Dark theme][win32]- TabFolder header not styled
IIUC this relies on Windows adding native support, which doesn't appear to have happened yet.

@mickaelistria
Copy link
Contributor

There is no hope Windows provide a style engine and this can be done natively. One possibility though would be to derive default colors in TabFolder from the parent folder, but I'm not certain it's desired in all cases. Can't the dark theme itself style the native TabFolder? cc @vogella

@vogella
Copy link
Contributor

vogella commented Jun 29, 2022

There is no hope Windows provide a style engine and this can be done natively. One possibility though would be to derive default colors in TabFolder from the parent folder, but I'm not certain it's desired in all cases. Can't the dark theme itself style the native TabFolder? cc @vogella

As long as SWT does not support it, we cannot style it via CSS. CSS "only" uses SWT API under the hood. Looks like it would be possible to support this in SWT, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=566359#c2

jjohnstn pushed a commit to eclipse-jdt/eclipse.jdt.ui that referenced this issue Jul 25, 2022
Using CTabFolder and CTabItem, instead of TabFolder/TabItem, improves
the look when in Dark Theme; the background of the tab no longer has a
non-dark background.

This relates to multiple commits to fix:

[Windows][Dark theme] Multiple preference pages use tab widgets, that
are not dark theme aware eclipse-platform/.github#27
@jonahgraham
Copy link
Contributor

so just switching everywhere is not the right approach, esp if the real issue "windows theming of TabFolder" is not even investigated.

@akurtakov the above comment is what I referred to in planning council. On the understanding that the TabFolder -> CTabFolder is bandaid solution can you confirm that this is ok to proceed with bandaid solution for now?

@akurtakov
Copy link
Member

If we are clear there is no one to do real fix - bandaid it is.

betamaxbandit added a commit to betamaxbandit/eclipse.platform.ui that referenced this issue Oct 3, 2022
Using CTabFolder and CTabItem, instead of TabFolder/TabItem, improves
the look when in Dark Theme; the background of the tab no longer has a
non-dark background.

This relates to multiple commits to fix:

[Windows][Dark theme] Multiple preference pages use tab widgets, that
are not dark theme aware eclipse-platform/.github#27
@mickaelistria
Copy link
Contributor

I'm worried that the because of win-specific issues and adopting "bandaid", we're reducing the quality of other OS support. Linux for example behaves very well with TabFolders, better than with CTabFolders, so seeing this pattern spreading across the whole IDE is likely to negatively affect Linux.

vogella pushed a commit to eclipse-platform/eclipse.platform.ui that referenced this issue Oct 5, 2022
Using CTabFolder and CTabItem, instead of TabFolder/TabItem, improves
the look when in Dark Theme; the background of the tab no longer has a
non-dark background.

This relates to multiple commits to fix:

[Windows][Dark theme] Multiple preference pages use tab widgets, that
are not dark theme aware eclipse-platform/.github#27
betamaxbandit added a commit to betamaxbandit/equinox_john that referenced this issue Oct 10, 2022
Using CTabFolder and CTabItem, instead of TabFolder/TabItem, improves
the look when in Dark Theme; the background of the tab no longer has a
non-dark background.

This relates to multiple commits to fix:

[Windows][Dark theme] Multiple preference pages use tab widgets, that
are not dark theme aware eclipse-platform/.github#27
@laeubi
Copy link
Contributor

laeubi commented Oct 10, 2022

Originally posted by @laeubi in eclipse-equinox/equinox#137 (comment)

@jonahgraham @mickaelistria @akurtakov I think this clearly shows that the "bandaiding" do not work/scale well... We can't put a restriction on every eclipse plugin to use CTab(Folder) just to improve dark-mode users... That will effectively require deprecate usage of TabFolder in all Platform code and every plugin written for eclipse...


I must confess it seems to be that there was already a decision, its a bit strange to merge all those PRs if it is not decided how to proceed?

@akurtakov
Copy link
Member

Seeing this going on as search and replace of TabFolder with CTabFolder and there are many more places like that even outside Platform and getting complains from two of the most active Platform developers about it I think we should reconsider and this "bandaid" solution is not OK anymore.
Please work in proper fix in Win32 SWT TabFolder.

@akurtakov
Copy link
Member

If you disagree with my assesment here feel free to send email to Eclipse PMC so it's discussed and voted there but punishing other OS users via CTabFolder (yes, it's slower, uglier and lacks integration) because Win32 port is not worked on is not OK.

@jonahgraham
Copy link
Contributor

Please work in proper fix in Win32 SWT TabFolder.

Just to be clear, there is no one available to do this. Saying no to the bandaid means that we are deciding to live with status quo on Windows.

The colour of the tabs isn't the most important feature of dark mode in the IDE, and I don't care enough about this issue to argue for it and I will happily defer to more experienced Platform developers. The Planning Council will be requesting from the IDE WG more investment in this area so that (if we can find someone to do it) it can be fixed.

@akurtakov
Copy link
Member

Is this still relevant?

@pbalint
Copy link
Author

pbalint commented Nov 14, 2024

Yes, the tabs are still light-gray when dark theme is used

@akurtakov
Copy link
Member

@HeikoKlare I don't remember who looked at dark theme issues. If you do would you please let him know of this one.

@HeikoKlare
Copy link
Contributor

@BeckerWdf are you looking into theming related issues, in particular since you are working on the updated light (and dark) themes?

@mvm-sap
Copy link

mvm-sap commented Nov 19, 2024

I will have a look into the issue and update here

@mvm-sap
Copy link

mvm-sap commented Nov 19, 2024

I attempted to define colors for TabFolder in the CSS file, but that action did not change anything. The color definition has been done somewhere else for TabFolder, and it is selected from that location. Need some more time to investigate further.

Screenshot 2024-11-19 155036

Also, I cannot open the CSS spy dialog multiple times in the preference dialog, which does not allow me to check all the defined properties and experiment with colors. Is there a specific reason for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants