From 122b94f7d09e4d38f94a6f6ec9a629c43ac98421 Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Tue, 28 Jun 2022 09:54:21 +0200 Subject: get rid of unneeded scroll bar for real this time (cf. #98) --- .../java/at/asit/pdfover/gui/composites/ConfigurationComposite.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index fdc05e5e..f2e10726 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -196,7 +196,11 @@ public class ConfigurationComposite extends StateComposite { aboutCompositeScr.setContent(aboutConfigComposite); aboutCompositeScr.setExpandHorizontal(true); aboutCompositeScr.setExpandVertical(true); - aboutCompositeScr.setMinSize(aboutConfigComposite.computeSize(300, SWT.DEFAULT)); + aboutCompositeScr.addListener(SWT.Resize, (event) -> { + int widthHint = aboutCompositeScr.getClientArea().width - 50; /* offset for scroll bar */ + aboutCompositeScr.setMinSize(null); + aboutCompositeScr.setMinSize(aboutCompositeScr.computeSize(widthHint, SWT.DEFAULT)); + }); this.tabFolder.setSelection(this.simpleTabItem); -- cgit v1.2.3