-
Notifications
You must be signed in to change notification settings - Fork 229
Adjust selection bounds for CTabRenderring #3533
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
base: master
Are you sure you want to change the base?
Conversation
Test Results 3 018 files +142 3 018 suites +142 2h 22m 8s ⏱️ + 27m 45s For more details on these failures, see this check. Results for commit 046398a. ± Comparison against base commit db4295a. ♻️ This comment has been updated with latest results. |
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
b510ca2 to
8be0403
Compare
|
@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: |
8be0403 to
c878f05
Compare
HeikoKlare
left a comment
There was a problem hiding this 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):

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.
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
88fc99e to
a4713f9
Compare
No, it should be fully aligned at the top, left and right without any gaps at every zoom. |
|
@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. |
@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 |
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:
|
|
This pull request changes some projects for the first time in this development cycle. 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 patchFurther information are available in Common Build Issues - Missing version increments. |
691b22d to
fe5e96b
Compare
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
ed8d36f to
d79a1fe
Compare
|
After latest adaptation, there is no more "Bleeding" on the very left and right. The selection highlight looks fine to me in different zoom levels. Also addressed the comments from you @HeikoKlare. Let me know if I miss something.
|
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to be coming closer. The code became much simpler and many scenarios now look good.
But with rounded corner, the highlight is still far too large. At 150%, it looks like this (compare to the "correct" hight for the non-focused "problem" view below):

When reducing the hight by 1, I see the rendering artifacts mentioned before again.
The screenshots in the previous post seem to be taken with some custom auto-scaling settings. The tab icons are not scaled according to the text, so probably monitor-specific scaling is disabled or some custom auto-scale configuration is active.
d79a1fe to
fbbfba3
Compare
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looks almost fine now. But the lines still do not have the same height, such that the highlight bar with rounded corners appear a bit too thick and prominent. These are the heights I get:
- 100%: round corners 3px, square corners 2px
- 175%: round corners 5px, square corners 4px
Here is the comparison of the highlight at 100% with round corners before (top) and after (bottom) this change:

The overall appearance is definitely much better, but the line is thicker now.
....ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/CTabRendering.java
Outdated
Show resolved
Hide resolved
Removing my request for changes as the major concerns are addressed and basically only the line thickness in scenario is missing. Thus I cannot approve yet, but since I will be on vacation soon I do not want to have my request for change block progress here.
fbbfba3 to
9d72757
Compare
9d72757 to
bfa441e
Compare
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)
bfa441e to
046398a
Compare












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: