Community
Participate
Working Groups
Created attachment 282126 [details] wrong background See attached picture. That happened on recent 4.16 builds (I see this in I20200316-1800, GTK 3.22.30 on RHEL 7.4). I assume it is a regression from one of bug 561047 commits, probably some usual GTK CSS weirdness.
Yep, the commit https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=593b5cd2a666c5f7e2b61577f5d656dab6306026 is it.
OK, looks like Adwaita can show right colors there, so the regression is for non-default themes only (that supposed something like CSS id's were kind of API, which is of course was never the case for GTK3). Clearlooks-Phenix is affected, we will most likely need to provide patch on our end, need to check what was changed in detail. Related SWT code change is: https://git.eclipse.org/r/#/c/159272/3/bundles/org.eclipse.swt/Eclipse+SWT/gtk/org/eclipse/swt/widgets/Text.java We can also check why only specific cases are affected, may be the way how Text instances are created in org.eclipse.ui.internal.ide.dialogs.ResourceInfoPage.createBasicInfoGroup() is "special". Commenting out lines below "fixes" the issue: diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java index cb3f156..9684698 100644 --- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java +++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/ResourceInfoPage.java @@ -212,8 +212,8 @@ gd.horizontalAlignment = GridData.FILL; gd.horizontalSpan = 2; pathValueText.setLayoutData(gd); - pathValueText.setBackground(pathValueText.getDisplay().getSystemColor( - SWT.COLOR_WIDGET_BACKGROUND)); +// pathValueText.setBackground(pathValueText.getDisplay().getSystemColor( +// SWT.COLOR_WIDGET_BACKGROUND)); // The group for types Label typeTitle = new Label(basicInfoComposite, SWT.LEFT); @@ -223,8 +223,8 @@ GridDataFactory.swtDefaults().span(2, SWT.DEFAULT).applyTo(typeValue); typeValue.setText(IDEResourceInfoUtils.getTypeString(resource, getContentDescription(resource))); - typeValue.setBackground(typeValue.getDisplay().getSystemColor( - SWT.COLOR_WIDGET_BACKGROUND)); +// typeValue.setBackground(typeValue.getDisplay().getSystemColor( +// SWT.COLOR_WIDGET_BACKGROUND)); if (resource.isLinked() && !resource.isVirtual()) { // The group for location
Thanks Dani!
The change on ResourceInfoPage was done for Linux only, see bug 80646, but I was wrong regarding *this* bug - now I couldn't reproduce anything by removing the calls to set GB color on text fields. Must mixed something before. The color constants values did not change either due the commit => this is CSS selector only change. The CSS style we create in NOW org.eclipse.swt.widgets.Text.setBackgroundGdkRGBA(long, long, GdkRGBA) textview {background-color: rgb(237,236,235);} textview text:selected {background-color: rgb(148,182,224);} textview text selection {color: rgb(255,255,255);} before we created: textview text {background-color: rgb(237,236,235);} textview text:selected {background-color: rgb(148,182,224);} textview text selection {color: rgb(255,255,255);} We see a typo in the first CSS line. I will push fix in a moment.
New Gerrit change created: https://git.eclipse.org/r/159623
My mistake, sorry about that. I read twice the changes but still missed this one.
(In reply to Alexander Kurtakov from comment #6) > My mistake, sorry about that. I read twice the changes but still missed this > one. Alex, I had to read it more then once to spot the difference in debugger. The code was real spaghetti.
(In reply to Andrey Loskutov from comment #7) > (In reply to Alexander Kurtakov from comment #6) > > My mistake, sorry about that. I read twice the changes but still missed this > > one. > > Alex, I had to read it more then once to spot the difference in debugger. > The code was real spaghetti. Absolutely. There is a reason why I push so much for cleanups - in many places we need badly to drop such stuff as otherwise fear from fixing/changing anything will spread out again as no one can be sure if he has to touch such code.
Gerrit change https://git.eclipse.org/r/159623 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=4a8fc08bf89e7bd4f343fdb3090362bf4f364cda
Verified with build I20200318-1400