From f3446f32ad8c193feed991187aac20fe4a91bdea Mon Sep 17 00:00:00 2001 From: Arda Aydin Date: Thu, 24 Sep 2026 10:26:57 +0300 Subject: [PATCH] Open Page Editor at a per-device default zoom (Rion 100%) Co-Authored-By: Claude Opus 5.5 --- app_state.py | 2 +- ox_page_view.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app_state.py b/app_state.py index d467ff8..e275dbd 100644 --- a/app_state.py +++ b/app_state.py @@ -8,7 +8,7 @@ so later rebinding would only ever be seen by the module that did it. import configparser 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") DEFAULT_GRID_SIZE = 10 DEFAULT_ADD_TIMESTAMP = True diff --git a/ox_page_view.py b/ox_page_view.py index c7cbfbe..072cd13 100644 --- a/ox_page_view.py +++ b/ox_page_view.py @@ -33,14 +33,17 @@ DEVICE_PROFILES = { "screen": (800, 480), "frame_file": "frame_orion.png", "screen_offset": (191, 169), + "default_zoom": 0.5, }, "ontrolRion": { "screen": (320, 240), "frame_file": "frame_rion.png", "screen_offset": (76, 62), + "default_zoom": 1.0, }, } 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) @@ -177,7 +180,7 @@ class OxPageViewPanel: self._canvas_w = self._screen_w + 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._widget_items = {} self._tag_to_comp = {}