Browse Source

Merge pull request #310 in BA/design from ~ZHOUPING/design:master to master

* commit 'cf723aa0474e4dcfc10c5e0fb53a337ecd178a3e':
  toolKit放到xwabsolute中
master
superman 8 years ago
parent
commit
d41739348e
  1. 5
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

5
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -75,7 +75,7 @@ public class XWAbsoluteLayout extends XLayoutContainer {
xConnectorMap.put(connector, new XConnector(connector, this));
}
initPercent();
initPercent(widget);
}
/**
@ -89,13 +89,14 @@ public class XWAbsoluteLayout extends XLayoutContainer {
}
//根据屏幕大小来确定显示的百分比, 1440*900默认100%, 1366*768缩放90%
private void initPercent(){
private void initPercent(WAbsoluteLayout widget){
Toolkit toolkit = Toolkit.getDefaultToolkit();
Dimension scrnsize = toolkit.getScreenSize();
double screenValue = FRScreen.getByDimension(scrnsize).getValue();
if(screenValue != FormArea.DEFAULT_SLIDER){
this.setContainerPercent(screenValue / FormArea.DEFAULT_SLIDER);
}
widget.setDesigningResolution(scrnsize);
}
/**

Loading…
Cancel
Save