fine-tune netmask combo width on Windows...

This commit is contained in:
Anton Keks 2021-02-01 23:36:18 +02:00
parent 837ab5d394
commit 855a51caec

View File

@ -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)