AtomMaterialUI / material-theme-issues

Issues Repository for the Material Theme UI plugin for JetBrains
Other
64 stars 4 forks source link

Both tabs highlighted in split pane mode #395

Closed oldium closed 1 year ago

oldium commented 1 year ago

Describe the bug

When in split-pane mode, both tabs are highlighted as active, not only the one with cursor.

To Reproduce

  1. Right-click on current tab, select Split Right.
  2. Observe that both tabs are highlighted as active.

Expected behavior

The tab without cursor should be dimmed.

Material Theme Version

v8.11.0

IDE

DataGrip

System Info

DataGrip 2023.2.1
Build #DB-232.9559.28, built on August 16, 2023
Licensed to ***********
You have a perpetual fallback license for this version.
Subscription is active until ********.
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry:
    editor.focus.mode.color.light=5a5d63
    ide.editor.tab.selection.animation=true
    debugger.new.tool.window.layout=true
    ide.animate.toolwindows=true
    ide.new.editor.tabs.vertical.borders=true
    ide.experimental.ui=true
    ide.balloon.shadow.size=0
    editor.focus.mode.color.dark=5a5d63

Non-Bundled Plugins:
    com.tabnine.TabNine (1.2.0)
    com.alayouni.ansiHighlight (23.2.0)
    dev.polek.adbwifi (1.2.5)
    ski.chrzanow.foldableprojectview (1.1.6)
    com.tang (1.4.8-IDEA231)
    mobi.hsz.idea.gitignore (4.5.1)
    com.chrisrm.idea.MaterialThemeUI (8.11.0)

Logs/Screenshots

image

mallowigi commented 1 year ago

It's by design. You can change the color in the Color Scheme Settings > Tabs Underline Inactive

oldium commented 1 year ago

It's by design. You can change the color in the Color Scheme Settings > Tabs Underline Inactive

The inactive tab is rendered with active underline color, which looks like a bug. When I disable Material UI plugin, the tabs are rendered correctly.

Without Material UI plugin: image

mallowigi commented 1 year ago

I see, you're right, I disabled it at the time.

I'll add this to the backlog.

mallowigi commented 1 year ago

I just checked in more detail, and I was right before. Closing.

oldium commented 1 year ago

So what should I do in order to fix this actually, please? When I enable Material UI, both tabs are rendered as highlighted-active, this is wrong. The one without cursor should have a different (dimmed/gray) highlighting color.

mallowigi commented 1 year ago

Check the underline tab color in the color scheme and assign it the value you want. Currently the colors are the same yes, but with a different opacity. It's dim, I agree, but this is a design choice. If it gets asked enough, I'll think of an alternative color.

oldium commented 1 year ago

Ok, thanks, I found it. I had to set the “Underline inactive” color (previously unset) to simulate the behaviour of IDE without Material UI. I think better would be to have some sensible default in Material UI, so that I am not forced to tune the theme - this is why I chose to pay for Material UI - to forget about the theme color details in the first place 😊

image

mallowigi commented 1 year ago

I need to think about it. I can agree on that statement, though the default gray color is not a suitable choice. I'm thinking more about the "disabledColor" or the "textColor".

In any case it won't happen right now.

mallowigi commented 1 year ago

I did it in the end. Should be available on the latest version.

oldium commented 1 year ago

Thanks, unfortunately it does not do anything for me. It works somehow for themes with Material in the name, but I am used to use the “Dark” theme with Lime as an accent color plus Material UI tweaks.

I also tried to create custom theme from the Dark one (Material Theme UI/Custom Theme, select Color Scheme: Dark, change the Accent Color to 7CB342), but still no gray for the inactive selected tab. When I load different theme with Load From... Material Darker, the inactive selected tab color works (it is gray), but the active tab color is orange independently on the selected Accent Color (in Material Theme UI/Custom Theme/Accent Color).

Also when I select the “Martial Darker” theme in Material Theme UI/Settings, the changed Accent color (Material Theme UI/Settings/Custom Accent Color) has no effect on tab underline color.

I am really not sure if I am doing something wrong, but for me the only working combination is to select the Dark theme in the Material Theme UI/Settings, change the accent color to Lime and override the “Underline inactive” tab color.

mallowigi commented 1 year ago

Thanks, unfortunately it does not do anything for me. It works somehow for themes with Material in the name, but I am used to use the “Dark” theme with Lime as an accent color plus Material UI tweaks. As I said previously, this is a color scheme setting. That update updated the bundled color schemes to change the inactive tab underline to the same color as the "Text Color", e.g. the trees foreground color. What happens in other schemes is not of my resort.

I also tried to create custom theme from the Dark one (Material Theme UI/Custom Theme, select Color Scheme: Dark, change the Accent Color to 7CB342), but still no gray for the inactive selected tab. When I load different theme with Load From... Material Darker, the inactive selected tab color works (it is gray), but the active tab color is orange independently on the selected Accent Color (in Material Theme UI/Custom Theme/Accent Color).

This might be an issue. The tab color is of the color scheme, but the plugin applies an additional layer on top of the color scheme, which is used for the custom Tab Highlight Position, as well as the Custom Tab Highlight Color. But if you don't have the Custom Tab Highlight Color enabled, it uses the one defined in the color scheme, and only if not defined it will resort to use the Accent Color. If it's not the case, please open an issue about it specifically, with reproducible steps.

So for short, here are what dictates the behavior of the tabs colors:

More info: https://material-theme.com/docs/configuration/tab-settings/#active-tab-highlighter

Tab Settings - Material Theme UI Documentation
Control the appearance of the Editor Tabs
oldium commented 1 year ago

I am using the Dark theme, which is the official JetBrains scheme and does not have the Editor/Tabs/Underline nor Editor/Tabs/Underline inactive set in the color scheme.

I am not using the Active Tab Highlight Color (unset) in the Appearance & Behavior/Material Theme UI/Settings/Tabs if you mean this one.

When I check the Editor/Color Scheme/General, it shows both Editor/Tabs/Underline and Editor/Tabs/Underline inactive unset for the IntelliJ color schemes (like “Dark”), but both are set for all Material color schemes (this matches the default accent color).

The problem with accent color for tab undelines in Material color schemes is probably independent on this issue, so I can create a separate issue for it.

For this issue I am still using the same steps to reproduce it. It is 100% reproducible also on clean setup (I used CLion 2023.2.2 on Linux/WSL2 for this test):

  1. Restore the default settings.
  2. During startup select Create new project...
  3. Install the Material Theme UI.
  4. Restart the IDE to activate the plugin.
  5. Move one of the opened tabs to the right to have two tabs visible at the same time.
  6. Observe the tab underline color.

image

On my system the IDE starts with the Dark theme after the Restore Default Settings step.