From d4012ee29fe041885c01baea41d4ac9e40e2706a Mon Sep 17 00:00:00 2001 From: Jakob Heher Date: Thu, 7 Jul 2022 15:52:26 +0200 Subject: disable scrollwheel in config, cf. #100 --- .../gui/composites/configuration/AdvancedConfigurationComposite.java | 3 +++ .../gui/composites/configuration/KeystoreConfigurationComposite.java | 2 ++ .../gui/composites/configuration/SimpleConfigurationComposite.java | 2 ++ 3 files changed, 7 insertions(+) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java index b2db3875..ea84abce 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java @@ -175,6 +175,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { this.sclTransparenz.setMaximum(255); this.sclTransparenz.setIncrement(1); this.sclTransparenz.setPageIncrement(10); + StateComposite.disableEventDefault(sclTransparenz, SWT.MouseVerticalWheel); this.sclTransparenz.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -238,6 +239,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { this.cmbBKUAuswahl = new Combo(this.grpBkuAuswahl, SWT.READ_ONLY); StateComposite.anchor(cmbBKUAuswahl).right(100,-5).top(0).left(0,5).set(); StateComposite.setFontHeight(cmbBKUAuswahl, Constants.TEXT_SIZE_NORMAL); + StateComposite.disableEventDefault(cmbBKUAuswahl, SWT.MouseVerticalWheel); this.bkuStrings = Arrays.stream(BKUs.values()).map(s -> Messages.getString("BKU."+s)).collect(Collectors.toList()); this.cmbBKUAuswahl.setItems(bkuStrings.toArray(new String[0])); @@ -342,6 +344,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { StateComposite.anchor(cmbLocaleAuswahl).right(100,-5).top(0).left(0,5).set(); StateComposite.setFontHeight(cmbLocaleAuswahl, Constants.TEXT_SIZE_NORMAL);; this.cmbLocaleAuswahl.setItems(Arrays.stream(Constants.SUPPORTED_LOCALES).map(l -> l.getDisplayLanguage()).toArray(String[]::new)); + StateComposite.disableEventDefault(cmbLocaleAuswahl, SWT.MouseVerticalWheel); this.cmbLocaleAuswahl.addSelectionListener(new SelectionAdapter() { @Override diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java index 7ea2a642..757c31d7 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java @@ -132,6 +132,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { this.cmbKeystoreType = new Combo(grpKeystore, SWT.READ_ONLY); StateComposite.anchor(cmbKeystoreType).right(100, -5).top(lblKeystoreType, 5).left(0,15).set(); StateComposite.setFontHeight(cmbKeystoreType, Constants.TEXT_SIZE_NORMAL); + StateComposite.disableEventDefault(cmbKeystoreType, SWT.MouseVerticalWheel); this.lblKeystoreStorePass = new Label(this.grpKeystore, SWT.NONE); StateComposite.anchor(lblKeystoreStorePass).top(cmbKeystoreType, 5).left(0,5).set(); @@ -151,6 +152,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { this.cmbKeystoreAlias = new Combo(grpKeystore, SWT.NONE); StateComposite.anchor(cmbKeystoreAlias).top(lblKeystoreAlias, 5).left(0,15).right(100,-5).set(); StateComposite.setFontHeight(cmbKeystoreAlias, Constants.TEXT_SIZE_NORMAL); + StateComposite.disableEventDefault(cmbKeystoreAlias, SWT.MouseVerticalWheel); this.lblKeystoreKeyPass = new Label(this.grpKeystore, SWT.NONE); StateComposite.anchor(lblKeystoreKeyPass).top(cmbKeystoreAlias, 5).left(0,5).set(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java index 887ea91a..83c159a0 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java @@ -164,6 +164,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { this.cmbSignatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY); StateComposite.anchor(cmbSignatureProfiles).left(0,10).right(100,-10).top(0,10).bottom(100,-10).set(); StateComposite.setFontHeight(cmbSignatureProfiles, Constants.TEXT_SIZE_NORMAL); + StateComposite.disableEventDefault(cmbSignatureProfiles, SWT.MouseVerticalWheel); this.cmbSignatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -296,6 +297,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { this.cmbSignatureLang = new Combo(this.grpSignatureLang, SWT.READ_ONLY); StateComposite.anchor(cmbSignatureLang).left(0,10).right(100,-10).top(0,10).bottom(100,-10).set(); StateComposite.setFontHeight(cmbSignatureLang, Constants.TEXT_SIZE_NORMAL); + StateComposite.disableEventDefault(cmbSignatureLang, SWT.MouseVerticalWheel); this.cmbSignatureLang.setItems(Arrays.stream(Constants.SUPPORTED_LOCALES).map(l -> l.getDisplayLanguage()).toArray(String[]::new)); this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() { -- cgit v1.2.3