Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class Preferences
@Preference public static String probe_display;
/** Preference setting */
public static final List<TextPatch> pv_name_patches = new ArrayList<>();
/** Preference setting */
@Preference public static int default_zoom_factor;

static
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package org.csstudio.display.builder.runtime.app;

import org.csstudio.display.builder.representation.javafx.JFXRepresentation;
import org.csstudio.display.builder.runtime.Preferences;

import javafx.application.Platform;
import javafx.scene.control.ComboBox;
Expand All @@ -33,6 +34,15 @@ public ZoomAction(final DisplayRuntimeInstance instance)
getEditor().setText(txt);
});
setOnAction(event -> zoom(instance.getRepresentation()));

// Apply default zoom factor from settings.ini
Platform.runLater(() ->
{
String zoom = String.format("%d %%", Preferences.default_zoom_factor);
setValue(zoom);
// Invoke zoom changed handler
getOnAction().handle(null);
});
}

private void zoom(final JFXRepresentation representation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ update_throttle=250
# When left empty, the "Probe Display"
# context menu entry is disabled.
probe_display=examples:/probe.bob

# Default zoom factor (percentage) of display runtime window
default_zoom_factor=100