mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
main window is now centered on the screen on first run
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@390 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
4900c4ee56
commit
bb7f8fa43a
@ -14,6 +14,7 @@ import net.azib.ipscan.fetchers.PingFetcher;
|
||||
|
||||
import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.graphics.Rectangle;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
/**
|
||||
* DimensionsConfig
|
||||
@ -54,11 +55,12 @@ public class GUIConfig {
|
||||
askScanConfirmation = preferences.getBoolean("askScanConfirmation", true);
|
||||
|
||||
isMainWindowMaximized = preferences.getBoolean("windowMaximized", false);
|
||||
Rectangle screen = Display.getDefault().getBounds();
|
||||
mainWindowBounds = new Rectangle(
|
||||
preferences.getInt("windowLeft", 100),
|
||||
preferences.getInt("windowTop", 100),
|
||||
preferences.getInt("windowWidth", 600),
|
||||
preferences.getInt("windowHeight", 360));
|
||||
preferences.getInt("windowLeft", screen.x + screen.width/2 - 660/2),
|
||||
preferences.getInt("windowTop", screen.y + screen.height/2 - 380/2),
|
||||
preferences.getInt("windowWidth", 660),
|
||||
preferences.getInt("windowHeight", 380));
|
||||
|
||||
detailsWindowSize = new Point(
|
||||
preferences.getInt("detailsWidth", 300),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user