Open Page Editor at a per-device default zoom (Rion 100%)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 10:26:57 +03:00
co-authored by Claude Opus 5.5
parent 7ca029e3ea
commit f3446f32ad
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it.
import configparser import configparser
import os import os
VERSION = "0.0.0.126" VERSION = "0.0.0.127"
PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties") PROPERTIES_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), "editor.properties")
DEFAULT_GRID_SIZE = 10 DEFAULT_GRID_SIZE = 10
DEFAULT_ADD_TIMESTAMP = True DEFAULT_ADD_TIMESTAMP = True
+4 -1
View File
@@ -33,14 +33,17 @@ DEVICE_PROFILES = {
"screen": (800, 480), "screen": (800, 480),
"frame_file": "frame_orion.png", "frame_file": "frame_orion.png",
"screen_offset": (191, 169), "screen_offset": (191, 169),
"default_zoom": 0.5,
}, },
"ontrolRion": { "ontrolRion": {
"screen": (320, 240), "screen": (320, 240),
"frame_file": "frame_rion.png", "frame_file": "frame_rion.png",
"screen_offset": (76, 62), "screen_offset": (76, 62),
"default_zoom": 1.0,
}, },
} }
DEFAULT_SCREEN = (800, 480) DEFAULT_SCREEN = (800, 480)
DEFAULT_ZOOM = 0.5
ZOOM_LEVELS = (0.25, 0.33, 0.5, 0.67, 0.8, 1.0, 1.25, 1.5, 2.0, 3.0) ZOOM_LEVELS = (0.25, 0.33, 0.5, 0.67, 0.8, 1.0, 1.25, 1.5, 2.0, 3.0)
@@ -177,7 +180,7 @@ class OxPageViewPanel:
self._canvas_w = self._screen_w + CANVAS_PADDING * 2 self._canvas_w = self._screen_w + CANVAS_PADDING * 2
self._canvas_h = self._screen_h + CANVAS_PADDING * 2 self._canvas_h = self._screen_h + CANVAS_PADDING * 2
self._zoom = 0.5 self._zoom = profile.get("default_zoom", DEFAULT_ZOOM) if profile else DEFAULT_ZOOM
self._selected_widget = None self._selected_widget = None
self._widget_items = {} self._widget_items = {}
self._tag_to_comp = {} self._tag_to_comp = {}