Community
Participate
Working Groups
On windows 1. Start with a empty project explorer or package explorer (e.g. a new workspace) 2. Select the explorer tab 3. Notice that the close icon disappeared. Also notice that the text is selected with a thin line box, on my other tabs that doesn't happen. When a project exists in the workspace, the close icon does not disappear anymore (nor does the thin line box show up).
Looks like the gc foreground color is changed by the calling code for this case to Color {255, 255, 255, 255}. We may have to fix the color which is used for drawing the close button.
Rolf, I see you provided a more advanced patch for the close drawing for 575398. Can you extract your color setting part and provide a Gerrit for this bug?
(In reply to Lars Vogel from comment #2) > Rolf, I see you provided a more advanced patch for the close drawing for > 575398. Can you extract your color setting part and provide a Gerrit for > this bug? The color in that change is rather hard coded, manually picked the color of the quick access button. There should be consent on which color to pick here, either hard-coded or some selected from the theme.
(In reply to Rolf Theunissen from comment #3) > (In reply to Lars Vogel from comment #2) > > Rolf, I see you provided a more advanced patch for the close drawing for > > 575398. Can you extract your color setting part and provide a Gerrit for > > this bug? > > The color in that change is rather hard coded, manually picked the color of > the quick access button. There should be consent on which color to pick > here, either hard-coded or some selected from the theme. I like it.
The root cause of the white color in the foreground is this snippet: CTabFolderRenderer line 1471: // draw a Focus rectangle if (parent.isFocusControl()) { Display display = parent.getDisplay(); if (parent.simple || parent.single) { gc.setBackground(display.getSystemColor(SWT.COLOR_BLACK)); gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE)); gc.drawFocus(xDraw-1, textY-1, extent.x+2, extent.y+2); } else { gc.setForeground(display.getSystemColor(BUTTON_BORDER)); gc.drawLine(xDraw, textY+extent.y+1, xDraw+extent.x+1, textY+extent.y+1); } } This code is hardly ever triggered, because the tabfolder is not often the focus control. Only on second activation of the tabfolder tab it becomes active. Should the gc be reset? Or shouldn't we assume any colors while drawing the close icon?
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184322
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184322 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=388d9cce23751ce2bc6c618b01ed6efc3cad29fa
(In reply to Eclipse Genie from comment #7) > Gerrit change > https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184322 was > merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=388d9cce23751ce2bc6c618b01ed6efc3cad29fa Thanks Rolf for the fix, resolving now.
Verified in Build id: I20210824-1800 on Win10
With this change the dark theme on Linux is dark instead of gray which looks broken to me.
If I revert 388d9cce23751ce2bc6c618b01ed6efc3cad29fa the x is light again in the dark theme. Rolf / Niraj, was the intention here to make the close dark in the dark theme?
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184446
(In reply to Lars Vogel from comment #11) > If I revert 388d9cce23751ce2bc6c618b01ed6efc3cad29fa the x is light again in > the dark theme. > > Rolf / Niraj, was the intention here to make the close dark in the dark > theme? On windows, this color is a gray that works well in the light and the dark theme. Very close to the original hard coded color, and personally I would try to avoid any hard coded color. Therefore picked this one, but of course cannot validate it on all platforms.
(In reply to Rolf Theunissen from comment #13) > (In reply to Lars Vogel from comment #11) > > If I revert 388d9cce23751ce2bc6c618b01ed6efc3cad29fa the x is light again in > > the dark theme. > > > > Rolf / Niraj, was the intention here to make the close dark in the dark > > theme? > > On windows, this color is a gray that works well in the light and the dark > theme. Very close to the original hard coded color, and personally I would > try to avoid any hard coded color. Therefore picked this one, but of course > cannot validate it on all platforms. Windows uses Color {105, 105, 105, 255} both in the light and dark theme. I updated the Gerrit to use this color so that is also looks good on Ubuntu. Please have a quick look.
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184446 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=d925d9258395c90f8e3c2b443d892bbed338c163
Verified under Linux with Eclipse SDK Version: 2021-09 (4.21) Build id: I20210829-1800 OS: Linux, v.5.11.0-31-generic, x86_64 / gtk 3.24.25 Java vendor: AdoptOpenJDK Java runtime version: 16.0.1+9 Java version: 16.0.1 and looks good in dark and light theme. Thanks a lot Rolf, Thomas and Niraj.
Also verified under Windows Eclipse SDK Version: 2021-09 (4.21) Build id: I20210831-1800 OS: Windows 10, v.10.0, x86_64 / win32 Java vendor: Eclipse Foundation Java runtime version: 16.0.2+7 Java version: 16.0.2