Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2012-09-02 20:07:01 +0000
committerGerrit Code Review @ Eclipse.org2012-09-02 20:07:01 +0000
commitfa2f9bf5afb9e111f496acd42dcca2696b0120fc (patch)
treeded4faf36e2c4bdfd76f8e0be3a075f9015b7faa /org.eclipse.egit.ui
parent0fb685ad6764e70e7274c74e7af61dc3cb5b2cc4 (diff)
parenta7a88e5138928c06a57da8f39bddd36950d184fe (diff)
downloadegit-fa2f9bf5afb9e111f496acd42dcca2696b0120fc.tar.gz
egit-fa2f9bf5afb9e111f496acd42dcca2696b0120fc.tar.xz
egit-fa2f9bf5afb9e111f496acd42dcca2696b0120fc.zip
Merge "Improve layout of decorator preference page"
Diffstat (limited to 'org.eclipse.egit.ui')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
index ccab4cf2f9..e1630b7a5a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GitDecoratorPreferencePage.java
@@ -188,13 +188,6 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
UIText.DecoratorPreferencesPage_bindingChangeSetShortMessage);
}
- /**
- * Constructs a decorator preference page
- */
- public GitDecoratorPreferencePage() {
- setDescription(UIText.DecoratorPreferencesPage_description);
- }
-
private static String removeBraces(String string) {
return string.replaceAll("[}{]", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -208,17 +201,12 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
Composite composite = SWTUtils.createHVFillComposite(parent,
SWTUtils.MARGINS_NONE);
- SWTUtils.createPreferenceLink(
- (IWorkbenchPreferenceContainer) getContainer(), composite,
- "org.eclipse.ui.preferencePages.Decorators", //$NON-NLS-1$
- UIText.DecoratorPreferencesPage_labelDecorationsLink);
+ SWTUtils.createLabel(composite, UIText.DecoratorPreferencesPage_description);
- SWTUtils.createPreferenceLink(
- (IWorkbenchPreferenceContainer) getContainer(), composite,
- "org.eclipse.ui.preferencePages.ColorsAndFonts", //$NON-NLS-1$
- UIText.DecoratorPreferencesPage_colorsAndFontsLink);
+ Composite folderComposite = SWTUtils.createHFillComposite(composite,
+ SWTUtils.MARGINS_NONE);
- TabFolder tabFolder = new TabFolder(composite, SWT.NONE);
+ TabFolder tabFolder = new TabFolder(folderComposite, SWT.NONE);
tabFolder.setLayoutData(SWTUtils.createHVFillGridData());
tabFolder.addSelectionListener(new SelectionAdapter() {
@@ -271,7 +259,7 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
Dialog.applyDialogFont(parent);
- return composite;
+ return tabFolder;
}
/**
@@ -309,6 +297,16 @@ public class GitDecoratorPreferencePage extends PreferencePage implements
recomputeAncestorDecorations
.setToolTipText(UIText.DecoratorPreferencesPage_recomputeAncestorDecorationsTooltip);
+ SWTUtils.createPreferenceLink(
+ (IWorkbenchPreferenceContainer) getContainer(), composite,
+ "org.eclipse.ui.preferencePages.Decorators", //$NON-NLS-1$
+ UIText.DecoratorPreferencesPage_labelDecorationsLink);
+
+ SWTUtils.createPreferenceLink(
+ (IWorkbenchPreferenceContainer) getContainer(), composite,
+ "org.eclipse.ui.preferencePages.ColorsAndFonts", //$NON-NLS-1$
+ UIText.DecoratorPreferencesPage_colorsAndFontsLink);
+
recomputeAncestorDecorations.addSelectionListener(this);
final TabItem tabItem = new TabItem(parent, SWT.NONE);

Back to the top