Skip to content

Commit

Permalink
About Dialog mit SWT.DEFAULT (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannMaierhofer committed Mar 4, 2024
1 parent d69dce7 commit 7aad443
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/de/jost_net/JVerein/gui/view/AboutView.java
Expand Up @@ -31,6 +31,7 @@
import de.willuhn.jameica.gui.util.ButtonArea;
import de.willuhn.jameica.gui.util.LabelGroup;
import de.willuhn.jameica.gui.util.SWTUtil;
import de.willuhn.jameica.gui.util.SimpleContainer;
import de.willuhn.jameica.plugin.AbstractPlugin;
import de.willuhn.jameica.system.Application;
import de.willuhn.util.ApplicationException;
Expand All @@ -41,7 +42,7 @@ public class AboutView extends AbstractDialog<Object>
public AboutView(int position)
{
super(position);
this.setSize(460, 550);
this.setSize(460, SWT.DEFAULT);
this.setTitle("Über...");
}

Expand All @@ -51,6 +52,7 @@ protected void paint(Composite parent) throws Exception
Label l = GUI.getStyleFactory().createLabel(parent, SWT.BORDER);
l.setImage(SWTUtil.getImage("JVerein.png"));

SimpleContainer container = new SimpleContainer(parent);
FormTextPart text = new FormTextPart();
text.setText("<form>"
+ "<p><b>Plugin für die Vereinsverwaltung unter Jameica</b></p>"
Expand All @@ -60,7 +62,7 @@ protected void paint(Composite parent) throws Exception
+ "<p>GitHub: https://github.com/openjverein/jverein</p>"
+ "<p>Dokumentation: https://openjverein.gitbook.io/doku</p></form>");

text.paint(parent);
text.paint(container.getComposite());

LabelGroup group = new LabelGroup(parent, "Information");

Expand Down Expand Up @@ -93,6 +95,7 @@ public void handleAction(Object context) throws ApplicationException
}
}, null, true, "window-close.png");

getShell().setSize(getShell().computeSize(SWT.DEFAULT,SWT.DEFAULT));
}

@Override
Expand Down

0 comments on commit 7aad443

Please sign in to comment.