From 855a51caecec3dcbc251ce802a90f1646edaa517 Mon Sep 17 00:00:00 2001 From: Anton Keks Date: Mon, 1 Feb 2021 23:36:18 +0200 Subject: [PATCH] fine-tune netmask combo width on Windows... --- src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java b/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java index faf90afc..52644037 100644 --- a/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java +++ b/src/net/azib/ipscan/gui/feeders/RangeFeederGUI.java @@ -115,8 +115,9 @@ public class RangeFeederGUI extends AbstractFeederGUI { pack(); Rectangle comboBounds = netmaskCombo.getBounds(); Rectangle endIPBounds = endIPText.getBounds(); - int width = endIPBounds.x + endIPBounds.width - comboBounds.x; - ((GridData) netmaskCombo.getLayoutData()).widthHint = width - 5; + int width = endIPBounds.x + endIPBounds.width - comboBounds.x - 5; + if (Platform.WINDOWS) width -= 22; // TODO: probably this number will change with updated SWT version + ((GridData) netmaskCombo.getLayoutData()).widthHint = width; pack(); // do this stuff asynchronously (to show GUI faster)