Skip to content
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

[MAC] - Light(Preview) theme - Fix for missing alternate row colors for Tree #2404

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvm-sap
Copy link
Contributor

@mvm-sap mvm-sap commented Oct 15, 2024

Tree Viewers had alternate row colors if they had coloumns, in Light Theme. This was missing in Light(Preview) theme. This has been fixed with this change by making swt-lines-visible (Tree Property) to true.
Please refer #2395

@@ -126,6 +125,11 @@ CTabFolder Canvas {
background-color: #f8f8f8;
}

.View Composite Tree{
background-color: #f8f8f8;
Copy link
Contributor

Choose a reason for hiding this comment

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

Tested on macOS.
Zebra-Lines are not visible because of this line. If this is removed. Zebar-Lines are visible.

@@ -126,6 +125,11 @@ CTabFolder Canvas {
background-color: #f8f8f8;
}

.View Composite Tree{
background-color: #f8f8f8;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
background-color: #f8f8f8;

Copy link
Contributor

github-actions bot commented Oct 15, 2024

Test Results

 1 802 files   -  19   1 802 suites   - 19   1h 42m 57s ⏱️ - 8m 46s
 7 714 tests ±  0   7 486 ✅ ±  0  228 💤 ±0  0 ❌ ±0 
23 944 runs   - 359  23 203 ✅  - 353  741 💤  - 6  0 ❌ ±0 

Results for commit 4d7d8a2. ± Comparison against base commit 5c9af91.

♻️ This comment has been updated with latest results.

@mvm-sap mvm-sap force-pushed the Fix_tree_viewer_alternate_colors_issue branch from 946ba25 to 00e7413 Compare October 15, 2024 14:40
Copy link
Contributor

@BeckerWdf BeckerWdf left a comment

Choose a reason for hiding this comment

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

looks good

@BeckerWdf
Copy link
Contributor

with this PR:
Screenshot 2024-10-15 at 16 45 24

before:
Screenshot 2024-10-15 at 16 46 48

@mvm-sap
Copy link
Contributor Author

mvm-sap commented Oct 16, 2024

with this PR: Screenshot 2024-10-15 at 16 45 24

before: Screenshot 2024-10-15 at 16 46 48

In after image, Project Explorer and Outline view have white background

@mvm-sap mvm-sap force-pushed the Fix_tree_viewer_alternate_colors_issue branch from 00e7413 to 28b2a1f Compare October 16, 2024 06:46
@BeckerWdf
Copy link
Contributor

In after image, Project Explorer and Outline view have white background

You are right. So they requirement would be: Show the zebra-lines in Trees but only when the tree has more then one column. Correct?

@mvm-sap
Copy link
Contributor Author

mvm-sap commented Oct 16, 2024

In after image, Project Explorer and Outline view have white background

You are right. So they requirement would be: Show the zebra-lines in Trees but only when the tree has more then one column. Correct?

Yes

@Phillipus
Copy link
Contributor

So they requirement would be: Show the zebra-lines in Trees but only when the tree has more then one column. Correct?

Actually zebra lines are only visible when Tree#setLinesVisible(true)

@@ -195,6 +194,10 @@ CTabFolder Canvas {
background-color: #ffffff;
}

#org-eclipse-ui-navigator-ProjectExplorer Tree{
Copy link
Contributor

Choose a reason for hiding this comment

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

We should reference concrete views of the Eclipse SDK.

@BeckerWdf
Copy link
Contributor

Do it get it right: Mac creates these zebra lines for trees only if they have more then two "columns"? Is that a feature of the native UI toolkit or is this controlled by the SWT implementation?

Is it correct that setting background color does overwrite the "show visible lines" setting? Is that think that is controlled by the SWT implementation?

Do we have a possibility to tell SWT so set the background only if "show visible lines" is false / if the tree as more then two "columns"?

@Phillipus
Copy link
Contributor

Phillipus commented Oct 23, 2024

Mac creates these zebra lines for trees only if they have more then two "columns"?

No. Zebra lines are only visible when Tree#setLinesVisible(true) with any amount of columns (or none).

@mvm-sap
Copy link
Contributor Author

mvm-sap commented Oct 23, 2024

Mac creates these zebra lines for trees only if they have more then two "columns"?

No. Zebra lines are only visible when Tree#setLinesVisible(true) with any amount of columns (or none).

Below is my understanding

Light theme
Project explorer, Outline View - Tree Control - has only one column - bg color is white - setLinesVisible is false
Problems View - Tree Control - has more than one column - bg has alternate row colors - setLinesVisible is true

Light (Preview) theme
we just set the bg color of Tree control to grey (#F8F8F8) in CSS file

.View Tree {
swt-background-color: #f8f8f8 
}

Project explorer, Outline View - Tree Control - has only one column - bg color is grey - setLinesVisible is false
Problems View - Tree Control - has more than one column - bg color is grey - setLinesVisible is set to false automatically

@BeckerWdf BeckerWdf force-pushed the Fix_tree_viewer_alternate_colors_issue branch from 28b2a1f to 8013b72 Compare October 25, 2024 12:56
@eclipse-platform-bot
Copy link
Contributor

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.css.swt/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From b0d7cb19564fd33d33b5e66590026e921586e0a0 Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Fri, 25 Oct 2024 13:01:03 +0000
Subject: [PATCH] Version bump(s) for 4.34 stream


diff --git a/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF
index a10944e052..b6e6c4e55d 100644
--- a/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.e4.ui.css.swt/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-SymbolicName: org.eclipse.e4.ui.css.swt;singleton:=true
-Bundle-Version: 0.15.400.qualifier
+Bundle-Version: 0.15.500.qualifier
 Bundle-Name: %pluginName
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
-- 
2.47.0

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

On macOS setting "linesVisible" to true creates an zebra styled pattern
on the tree. If we now set the background color via CSS
on this tree that pattern would be gone. Setting the background color
via CSS on a tree that has "linesVisible" to false does not do any harm.
@BeckerWdf BeckerWdf force-pushed the Fix_tree_viewer_alternate_colors_issue branch from ee04e52 to 4d7d8a2 Compare October 25, 2024 13:08
@BeckerWdf
Copy link
Contributor

I just pushed a fix for this.
@Phillipus: Can you pls test this on your side?

@Phillipus
Copy link
Contributor

I just pushed a fix for this.
@Phillipus: Can you pls test this on your side?

Tested, and I see zebras. 🦓 🦓 🦓 🦓

Thanks!

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.

4 participants