File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
app/display/runtime/src/main
java/org/csstudio/display/builder/runtime/app Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class ZoomAction extends ComboBox<String>
2222{
2323 private boolean updating = false ;
2424
25- @ Preference public static double default_zoom_factor ;
25+ @ Preference public static int default_zoom_factor ;
2626
2727 static
2828 {
@@ -35,6 +35,7 @@ public ZoomAction(final DisplayRuntimeInstance instance)
3535 setEditable (true );
3636 setPrefWidth (100.0 );
3737 getItems ().addAll (JFXRepresentation .ZOOM_LEVELS );
38+ setValue (JFXRepresentation .DEFAULT_ZOOM_LEVEL );
3839 // For Ctrl-Wheel zoom gesture
3940 instance .getRepresentation ().setZoomListener (txt ->
4041 {
@@ -43,10 +44,10 @@ public ZoomAction(final DisplayRuntimeInstance instance)
4344 });
4445 setOnAction (event -> zoom (instance .getRepresentation ()));
4546
46- // Add the zoom action into a queue
47+ // Apply default zoom factor from settings.ini
4748 Platform .runLater (() ->
4849 {
49- String zoom = String .format ("%d %%" , ( int )( default_zoom_factor * 100 ) );
50+ String zoom = String .format ("%d %%" , default_zoom_factor );
5051 setValue (zoom );
5152 });
5253 }
Original file line number Diff line number Diff line change 22# Package org.csstudio.display.builder.runtime.app
33# ----------------------
44
5- # Defualt zoom factor(double ) of display runtime window
6- default_zoom_factor =1.00
5+ # Default zoom factor (percentage ) of display runtime window
6+ default_zoom_factor =100
You can’t perform that action at this time.
0 commit comments