Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Wahlbrink2021-11-22 16:37:33 +0000
committerStephan Wahlbrink2021-11-22 16:38:17 +0000
commit5e7dba5bd9ae7c173dac23729d02cc9ee0fad1ce (patch)
tree7f4286f6111df1ef16f64e9f88e724035ab994e4
parentad75111659a56bdb21b28499a8b2dd9cc50b9e2c (diff)
downloadorg.eclipse.statet-commons-5e7dba5bd9ae7c173dac23729d02cc9ee0fad1ce.tar.gz
org.eclipse.statet-commons-5e7dba5bd9ae7c173dac23729d02cc9ee0fad1ce.tar.xz
org.eclipse.statet-commons-5e7dba5bd9ae7c173dac23729d02cc9ee0fad1ce.zip
[UI-Viewer] Fix text color of breadcrumb item after selection if themed
-rw-r--r--ecommons/org.eclipse.statet.ecommons.uimisc/src/org/eclipse/statet/ecommons/ui/viewers/breadcrumb/BreadcrumbItemDetails.java58
1 files changed, 30 insertions, 28 deletions
diff --git a/ecommons/org.eclipse.statet.ecommons.uimisc/src/org/eclipse/statet/ecommons/ui/viewers/breadcrumb/BreadcrumbItemDetails.java b/ecommons/org.eclipse.statet.ecommons.uimisc/src/org/eclipse/statet/ecommons/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
index c05049fd..e8aefd81 100644
--- a/ecommons/org.eclipse.statet.ecommons.uimisc/src/org/eclipse/statet/ecommons/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
+++ b/ecommons/org.eclipse.statet.ecommons.uimisc/src/org/eclipse/statet/ecommons/ui/viewers/breadcrumb/BreadcrumbItemDetails.java
@@ -314,37 +314,39 @@ class BreadcrumbItemDetails {
}
private void updateSelection() {
- Color background;
- Color foreground;
-
- if (this.selected && this.hasFocus) {
- background= Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION);
- foreground= Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT);
- }
- else {
- foreground= null;
- background= null;
- }
-
- if (isTextVisible()) {
- this.textComposite.setBackground(background);
- this.elementText.setBackground(background);
- this.elementText.setForeground(foreground);
+ if (!StylingUtils.isStylingSupported()) {
+ Color background;
+ Color foreground;
- this.imageComposite.setBackground(null);
- this.elementImage.setBackground(null);
- }
- else {
- this.imageComposite.setBackground(background);
- this.elementImage.setBackground(background);
+ if (this.selected && this.hasFocus) {
+ background= Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION);
+ foreground= Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT);
+ }
+ else {
+ foreground= null;
+ background= null;
+ }
- this.textComposite.setBackground(null);
- this.elementText.setBackground(null);
- this.elementText.setForeground(null);
+ if (isTextVisible()) {
+ this.textComposite.setBackground(background);
+ this.elementText.setBackground(background);
+ this.elementText.setForeground(foreground);
+
+ this.imageComposite.setBackground(null);
+ this.elementImage.setBackground(null);
+ }
+ else {
+ this.imageComposite.setBackground(background);
+ this.elementImage.setBackground(background);
+
+ this.textComposite.setBackground(null);
+ this.elementText.setBackground(null);
+ this.elementText.setForeground(null);
+ }
+
+ this.textComposite.redraw();
+ this.imageComposite.redraw();
}
-
- this.textComposite.redraw();
- this.imageComposite.redraw();
}
/**

Back to the top