Skip to content

Fixes #912 - Avoid lower corners when drawing square tabs #1333

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

Merged
merged 1 commit into from
Dec 1, 2023
Merged

Fixes #912 - Avoid lower corners when drawing square tabs #1333

merged 1 commit into from
Dec 1, 2023

Conversation

apeteri
Copy link
Contributor

@apeteri apeteri commented Nov 27, 2023

The last points in the polyline were visiting the lower right and lower left corners of the CTabFolder's client area before heading back to the starting point. These are now removed.

This makes "computeSquareTabOutline" behave the same way as "computeRoundTabOutline" does, which did not attempt to draw lines outside of the tab itself (also a horizontal leading/trailing line when in active mode).

Copy link
Contributor

github-actions bot commented Nov 27, 2023

Test Results

     900 files  ±0       900 suites  ±0   47m 8s ⏱️ -55s
  7 468 tests ±0    7 296 ✔️ ±0  153 💤 ±0  15 ±0  4 🔥 ±0 
23 553 runs  ±0  23 025 ✔️ ±0  509 💤 ±0  15 ±0  4 🔥 ±0 

For more details on these failures and errors, see this check.

Results for commit 27c9bec. ± Comparison against base commit 68d706e.

♻️ This comment has been updated with latest results.

@BeckerWdf
Copy link
Contributor

can you show a before / after screenshot?

@apeteri
Copy link
Contributor Author

apeteri commented Nov 27, 2023

Inactive mode:
square_inactive

Active mode:
square_active

For reference, here are rounded tabs which I didn't change:

Inactive mode:
rounded_inactive

Active mode:
rounded_active

@apeteri
Copy link
Contributor Author

apeteri commented Nov 27, 2023

@BeckerWdf the "bad" one is on the linked issue with a small main method. The line that's heading to the lower right is usually invisible because tabs have content, but occasionally a small part can appear if eg. you also have toolbar actions and they need to wrap.

@BeckerWdf
Copy link
Contributor

the build says:
"Failed to execute goal org.eclipse.tycho.extras:tycho-p2-extras-plugin:4.0.4:compare-version-with-baselines (compare-attached-artifacts-with-release) on project org.eclipse.e4.ui.workbench.renderers.swt: Only qualifier changed for (org.eclipse.e4.ui.workbench.renderers.swt/0.16.200.v20231127-1540). Expected to have bigger x.y.z than what is available in baseline (0.16.200.v20231030-2045) "

@BeckerWdf
Copy link
Contributor

BeckerWdf commented Dec 1, 2023

can you rebase your change to the newest master and let's check again if the version number of the effected bundle must be increased?

@BeckerWdf
Copy link
Contributor

can you rebase your change to the newest master and let's check again if the version number of the effected bundle must be increased?

It looks like the version number for org.eclipse.e4.ui.workbench.renderers.swt was already increased by this commit:
e543ba2

So it should only be a rebase on top of master and (force) push of your change.

@BeckerWdf BeckerWdf added this to the 4.31 M1 milestone Dec 1, 2023
The last points in the polyline were visiting the lower right and lower
left corners of the CTabFolder's client area before heading back to the
starting point. These are now removed.

This makes "computeSquareTabOutline" behave the same way as
"computeRoundTabOutline" does, which did not attempt to draw lines
outside of the tab itself (also a horizontal leading/trailing line when
in active mode).
@apeteri
Copy link
Contributor Author

apeteri commented Dec 1, 2023

Failures and errors are summarized here in the Linux build: https://github.com/eclipse-platform/eclipse.platform.ui/actions/runs/7060822162/job/19221154039?pr=1333#step:7:21292

Results:

Failures: 
  UIComparePreferencesAuto.testCompareViewersPref:57 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 190
  DeprecatedUIPreferencesAuto.testAppearancePref:61 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testDefaultTextEditorPref:67 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testFileEditorsPref:73 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testLocalHistoryPref:79 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testPerspectivesPref:85 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testWorkbenchPref:55 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIDialogsAuto.testCopyMoveProject:102 Warning: Button {Use &default location}
	Actual Width -> 147
	Recommended Width -> 149
  UIDialogsAuto.testEditorSelection:132 Warning: Button {&Internal editors}
	Actual Width -> 115
	Recommended Width -> 117
  UIPreferencesAuto.testAppearancePref:63 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testDefaultTextEditorPref:69 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testFileEditorsPref:75 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testLocalHistoryPref:81 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testPerspectivesPref:87 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testWorkbenchPref:57 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
Errors: 
  DeprecatedUIWizardsAuto.testNewProjectPage1:260 » SWT Widget is disposed
  DeprecatedUIWizardsAuto.testNewProjectPage2:285 » SWT Widget is disposed
  UIWizardsAuto.testNewProjectPage1:261 » SWT Widget is disposed
  UIWizardsAuto.testNewProjectPage2:285 » SWT Widget is disposed

Tests run: 1576, Failures: 15, Errors: 4, Skipped: 119

@BeckerWdf
Copy link
Contributor

Failures and errors are summarized here in the Linux build: https://github.com/eclipse-platform/eclipse.platform.ui/actions/runs/7060822162/job/19221154039?pr=1333#step:7:21292

Results:

Failures: 
  UIComparePreferencesAuto.testCompareViewersPref:57 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 190
  DeprecatedUIPreferencesAuto.testAppearancePref:61 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testDefaultTextEditorPref:67 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testFileEditorsPref:73 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testLocalHistoryPref:79 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testPerspectivesPref:85 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  DeprecatedUIPreferencesAuto.testWorkbenchPref:55 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIDialogsAuto.testCopyMoveProject:102 Warning: Button {Use &default location}
	Actual Width -> 147
	Recommended Width -> 149
  UIDialogsAuto.testEditorSelection:132 Warning: Button {&Internal editors}
	Actual Width -> 115
	Recommended Width -> 117
  UIPreferencesAuto.testAppearancePref:63 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testDefaultTextEditorPref:69 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testFileEditorsPref:75 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testLocalHistoryPref:81 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testPerspectivesPref:87 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
  UIPreferencesAuto.testWorkbenchPref:57 Warning: Button {Always r&un in background}
	Actual Width -> 184
	Recommended Width -> 186
Errors: 
  DeprecatedUIWizardsAuto.testNewProjectPage1:260 » SWT Widget is disposed
  DeprecatedUIWizardsAuto.testNewProjectPage2:285 » SWT Widget is disposed
  UIWizardsAuto.testNewProjectPage1:261 » SWT Widget is disposed
  UIWizardsAuto.testNewProjectPage2:285 » SWT Widget is disposed

Tests run: 1576, Failures: 15, Errors: 4, Skipped: 119

They are unrelated. See: #1351

@BeckerWdf BeckerWdf merged commit 898a0a0 into eclipse-platform:master Dec 1, 2023
@BeckerWdf
Copy link
Contributor

Thanks @apeteri for the fix.

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.

CTabRendering produces diagonal line for inactive square tabs
2 participants