Browse Source

Pull request #2026: REPORT-32317 cpt滚动条缩放问题

Merge in DESIGN/design from ~YVAN/design:bugfix/10.0 to bugfix/10.0

* commit '7520a6edefc2ded2145dc754c45ff4b872fa9baa':
  REPORT-32317 cpt滚动条缩放问题 在更改了界面的比例方法中,增加更新滚动条的宽度的逻辑
bugfix/10.0
Yvan 4 years ago
parent
commit
bf77a052e3
  1. 9
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

9
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -456,12 +456,17 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
grid.setHorizontalExtent(GridUtils.getExtentValue(0, columnWidthList, grid.getWidth(), resolution));
elementCasePane.getGrid().updateUI();
//更新Column和Row
((DynamicScrollBar) elementCasePane.getVerticalScrollBar()).setDpi(resolution);
((DynamicScrollBar) elementCasePane.getHorizontalScrollBar()).setDpi(resolution);
DynamicScrollBar verticalScrollBar = (DynamicScrollBar) elementCasePane.getVerticalScrollBar();
DynamicScrollBar horizontalScrollBar = (DynamicScrollBar) elementCasePane.getHorizontalScrollBar();
verticalScrollBar.setDpi(resolution);
horizontalScrollBar.setDpi(resolution);
elementCasePane.getGridColumn().setResolution(resolution);
elementCasePane.getGridColumn().updateUI();
elementCasePane.getGridRow().setResolution(resolution);
elementCasePane.getGridRow().updateUI();
//Yvan:更新滚动条值(主要是为了重置滚动条里的BoundedRangeModel的extent值),使之随着界面缩放
verticalScrollBar.setValue(verticalScrollBar.getValue());
horizontalScrollBar.setValue(horizontalScrollBar.getValue());
}
if (polyDezi != null) {
polyDezi.setResolution(resolution);

Loading…
Cancel
Save