Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-06-20 13:01:58 -0400
committerThomas Wolf2018-06-24 08:22:32 -0400
commit95c6ac4e487b44bbffbc7f3ede071f78b9530ac1 (patch)
tree7ae81ff73fbb7bd0fffe8a7f4ff5eed1497b16fc /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal
parent573601e43a0fc5283dfa2a925970c86e35d2c1d9 (diff)
downloadegit-95c6ac4e487b44bbffbc7f3ede071f78b9530ac1.tar.gz
egit-95c6ac4e487b44bbffbc7f3ede071f78b9530ac1.tar.xz
egit-95c6ac4e487b44bbffbc7f3ede071f78b9530ac1.zip
Set RepositoryPropertyPage zero pixel margin
The abstract property page implementation requires a zero pixel margin for the top level composite being returned by the concrete subclass. Change-Id: I0b6f5f9764114b6a95af1900ce4cf4d855fd8291 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Bug:536097
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java10
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java8
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java3
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java2
4 files changed, 16 insertions, 7 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
index b55ed8843..13db1bb41 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/ConfigurationEditorComponent.java
@@ -111,6 +111,8 @@ public class ConfigurationEditorComponent {
private boolean editable;
+ private int margin;
+
/**
* @param parent
* the parent
@@ -118,13 +120,16 @@ public class ConfigurationEditorComponent {
* to be used instead of the user configuration
* @param useDialogFont
* if <code>true</code>, the current dialog font is used
+ * @param margin
+ * horizontal margin to be used
*/
public ConfigurationEditorComponent(Composite parent, StoredConfig config,
- boolean useDialogFont) {
+ boolean useDialogFont, int margin) {
editableConfig = config;
this.shellProvider = new SameShellProvider(parent);
this.parent = parent;
this.useDialogFont = useDialogFont;
+ this.margin = margin;
}
void setConfig(FileBasedConfig config) throws IOException {
@@ -169,7 +174,8 @@ public class ConfigurationEditorComponent {
*/
public Control createContents() {
final Composite main = new Composite(parent, SWT.NONE);
- main.setLayout(new GridLayout(2, false));
+ GridLayoutFactory.fillDefaults().numColumns(2).margins(margin, 0)
+ .applyTo(main);
GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
if (editableConfig instanceof FileBasedConfig) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
index 8e47b7c72..fb37471ab 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/preferences/GlobalConfigurationPreferencePage.java
@@ -91,7 +91,8 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
SWTUtils.MARGINS_NONE);
TabFolder tabFolder = new TabFolder(composite, SWT.NONE);
tabFolder.setLayoutData(SWTUtils.createHVFillGridData());
- userConfigEditor = new ConfigurationEditorComponent(tabFolder, userConfig, true) {
+ userConfigEditor = new ConfigurationEditorComponent(tabFolder,
+ userConfig, true, 5) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
@@ -103,7 +104,8 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
updateApplyButton();
}
};
- sysConfigEditor = new ConfigurationEditorComponent(tabFolder, sysConfig, true) {
+ sysConfigEditor = new ConfigurationEditorComponent(tabFolder, sysConfig,
+ true, 5) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
@@ -310,7 +312,7 @@ public class GlobalConfigurationPreferencePage extends PreferencePage implements
repositoryConfig = repository.getConfig();
}
ConfigurationEditorComponent editorComponent = new ConfigurationEditorComponent(
- repoConfigComposite, repositoryConfig, true) {
+ repoConfigComposite, repositoryConfig, true, 5) {
@Override
protected void setErrorMessage(String message) {
GlobalConfigurationPreferencePage.this.setErrorMessage(message);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
index f2c8fc7d7..63960db89 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertyPage.java
@@ -59,7 +59,8 @@ public class RepositoryPropertyPage extends PropertyPage {
}
});
}
- editor = new ConfigurationEditorComponent(displayArea, config, true) {
+ editor = new ConfigurationEditorComponent(displayArea, config, true,
+ 0) {
@Override
protected void setErrorMessage(String message) {
RepositoryPropertyPage.this.setErrorMessage(message);
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
index 9956cd271..05bab87ab 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoryPropertySource.java
@@ -532,7 +532,7 @@ public class RepositoryPropertySource implements IPropertySource {
Composite main = (Composite) super.createDialogArea(parent);
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).grab(true,
true).applyTo(main);
- editor = new ConfigurationEditorComponent(main, myConfig, true) {
+ editor = new ConfigurationEditorComponent(main, myConfig, true, 5) {
@Override
protected void setErrorMessage(String message) {
EditDialog.this.setErrorMessage(message);

Back to the top