Skip to content

Conversation

@ShahzaibIbrahim
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim commented Nov 11, 2025

Selected tabs highlight look slightly off and more noticeable when zoom is not 100%. These adjusted value shows no gaps from top and better aligned highlights for tabs (Theme is enabled)

Results:

At 300% Before Changes:
image

From top left one px perhaps is missing and from top it is slightly downwards leaving the gap on top.

At 300% After Changes:

image

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

Test Results

0 files   -  3 018  0 suites   - 3 018   0s ⏱️ - 2h 15m 30s
0 tests  -  8 236  0 ✅  -  7 987  0 💤  - 248  0 ❌  - 1 
0 runs   - 23 628  0 ✅  - 22 836  0 💤  - 791  0 ❌  - 1 

Results for commit fe5e96b. ± Comparison against base commit 7829422.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change, the highlight line looks very thin (on 100%):
image

This is how it used to look:
image

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-517 branch 2 times, most recently from b510ca2 to 8be0403 Compare November 13, 2025 13:30
@ShahzaibIbrahim
Copy link
Contributor Author

ShahzaibIbrahim commented Nov 13, 2025

@HeikoKlare I found the problem. Here were drawing the tab from (0,0) pixel but still using initial item location (1,1) and hence the gap was visible. I also updated the height to 3 when we draw from (0,0) so we have enough height for the selection marker.

The code that caused the gap:
https://github.com/vi-eclipse/eclipse.platform.ui/blob/8be04038fd7a1dd5cf4f7972e7813d0925181315/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java#L572C2-L577

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The appearance is in my opinion much better than before. I have some questions/remarks on the current propose.
And the appearance with round tabs now became worse (than it already was before):
image

We may probably do something similar than in SWT to draw a proper shape. The current adjustments by 1 point based on cornerSize do not look sufficient.

@ShahzaibIbrahim ShahzaibIbrahim force-pushed the master-517 branch 2 times, most recently from 88fc99e to a4713f9 Compare November 17, 2025 11:48
@ShahzaibIbrahim ShahzaibIbrahim marked this pull request as draft November 17, 2025 12:00
@ShahzaibIbrahim
Copy link
Contributor Author

The appearance is in my opinion much better than before. I have some questions/remarks on the current propose. And the appearance with round tabs now became worse (than it already was before): image

We may probably do something similar than in SWT to draw a proper shape. The current adjustments by 1 point based on cornerSize do not look sufficient.

While I agree the rounded tabs should be adapted. But I wouldn't say it looks "worse" than master. Here's the SS comparing this PR and master state.

image

I would suggest that we fix the shape in another PR. This PR fixes the gap that we had from the top.

@ShahzaibIbrahim ShahzaibIbrahim marked this pull request as ready for review November 17, 2025 14:07
@amartya4256
Copy link
Contributor

I pulled the branch and ran it on 250%. This is how it looks for me:
image

I can see a small gap in the left and at the top. Is it supposed to look like this?

@HeikoKlare
Copy link
Contributor

HeikoKlare commented Nov 25, 2025

I can see a small gap in the left and at the top. Is it supposed to look like this?

No, it should be fully aligned at the top, left and right without any gaps at every zoom.

@ShahzaibIbrahim
Copy link
Contributor Author

I pulled the branch and ran it on 250%. This is how it looks for me: image

I can see a small gap in the left and at the top. Is it supposed to look like this?

Are you sure you checked out master-517 from platform.ui? We also have master-517 for SWT. I checked again and there is no gap for the highlight.

image

@HeikoKlare
Copy link
Contributor

@amartya4256 can you please retest this? Unfortunately, I have currently monitor available that I can set to 250%. Everything up to 225% looks fine to me.

@HeikoKlare
Copy link
Contributor

I would suggest that we fix the shape in another PR. This PR fixes the gap that we had from the top.

@ShahzaibIbrahim But maybe that would require another readaptation of the calculations. Shouldn't we just fix it right away? Then it would also make more sense to take into account the outlineBoundsForOutline as those are used by the calculations for the (potentially rounded) borders.

@ShahzaibIbrahim
Copy link
Contributor Author

I would suggest that we fix the shape in another PR. This PR fixes the gap that we had from the top.

@ShahzaibIbrahim But maybe that would require another readaptation of the calculations. Shouldn't we just fix it right away? Then it would also make more sense to take into account the outlineBoundsForOutline as those are used by the calculations for the (potentially rounded) borders.

I have added a commit to put highlight on rounded tabs. Although it looks big jagged as original one (non-selected rounded tabs) also bit jagged. I have reused the shape.

Here's the comparison of the selected and unselected tabs:

image

@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Dec 4, 2025

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF

Warning

🚧 This PR cannot be modified by maintainers because edits are disabled or it is created from an organization repository. To obtain the required changes apply the git patch manually as an additional commit.

Git patch
From f5ccee2902ee5e62162ce449cdfc45991ef6f3f6 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Thu, 4 Dec 2025 14:45:45 +0000
Subject: [PATCH] Version bump(s) for 4.39 stream


diff --git a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
index 249542c521..ca4f9ad426 100644
--- a/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.workbench.renderers.swt/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.workbench.renderers.swt;singleton:=true
-Bundle-Version: 0.16.1000.qualifier
+Bundle-Version: 0.16.1100.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.52.0

Further information are available in Common Build Issues - Missing version increments.

Selected tabs highlight look slightly off and more noticeable when zoom
is not 100%. These adjusted value shows no gaps from top and better
aligned highlights for tabs (Theme is enabled)
Comment on lines +634 to +635
int horizontalOffset = itemIndex == 0 || cornerSize == SQUARE_CORNER ? 0 : 1;
int widthAdjustment = cornerSize == SQUARE_CORNER ? 0 : 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since cornerSize == SQUARE_CORNER in this branch, these variable can be completely removed, can't they?

} else {
int[] highlightShape = Arrays.copyOf(tabOutlinePoints, tabOutlinePoints.length);
// Update Y coordinates in shape to apply highlight thickness
int thickness = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we need to apply the more complex calculation logic used for the SQUARE_CORNER case here? This seems to lead to hightlights that are far too thick:
image
image
Also note that there are blue-colored fragments remaining to the left and right. Seems like some more tweaking of the shape points is necessary.

Screenshots are taken at 175%.

int[] highlightShape = Arrays.copyOf(tabOutlinePoints, tabOutlinePoints.length);
// Update Y coordinates in shape to apply highlight thickness
int thickness = 2;
int highlightY = onBottom ? bottomY - thickness : thickness + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduces a regression, as it uses onBottom instead of the highlightOnTop. I think there is even a mistake in the general distinction just based on cornerSize == SQUARE_CORNER. You will also need to draw a rectangle in case of round corners but when the highlight is not at the end with the rounding, i.e., if highlightOnTop != onBottom. So the condition for drawing a rectangle probably needs to be cornerSize == SQUARE_CORNER || highlightOnTop == onBottom.
image
image

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

Successfully merging this pull request may close these issues.

CTabFolder highlight not positioned/sized correctly on zoom != 100%

4 participants