Pick Page Editor fonts and images from the platform's banks

The font and image rows are now dropdowns filled from <sedona home>/ontrol:
fontBank/imageBank on Rion, fontBankXL/imageBankXL on Orion. Orion lists
.oxfl fonts in landscape and .oxfp fonts in portrait, read from the
platform service's screenOrientation (loaded from the device in live mode
when the tree has not reached it). Images show their file extension while
the slot keeps the bare name. The font dialog is gone.

In portrait the Page Editor draws a 480x800 screen in
frame_orion_portrait.png, and the canvas renders text with the .oxfp
fonts, whose glyphs are stored a quarter turn anticlockwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-26 21:15:43 +03:00
co-authored by Claude Opus 5.5
parent 138d9927be
commit c01a192365
5 changed files with 228 additions and 84 deletions
+11 -2
View File
@@ -5,7 +5,8 @@ widgets (ontrolOx::Widget subclasses) by their x, y, width, height slots.
Supports selection, drag-move, and a synced widget tree.
Device resolution is detected from the schema kits:
ontrolOrion → 800×480
ontrolOrion → 800×480, or 480×800 when its platform service's screenOrientation
is portrait (drawn in frame_orion_portrait.png)
ontrolRion → 320×240
A device frame image (the physical bezel) sits behind the screen area when the
@@ -25,7 +26,7 @@ except ImportError:
import app_state
import live_hooks
import undo
from ox_widget_properties import OxWidgetPropertiesPanel
from ox_widget_properties import ORION_KIT, OxWidgetPropertiesPanel, orion_portrait
from ox_widget_render import WidgetPainter
from sax_dom import set_prop_value
@@ -47,6 +48,12 @@ DEVICE_PROFILES = {
"default_zoom": 1.0,
},
}
ORION_PORTRAIT_PROFILE = {
"screen": (480, 800),
"frame_file": "frame_orion_portrait.png",
"screen_offset": (190, 170),
"default_zoom": 0.5,
}
DEFAULT_SCREEN = (800, 480)
DEFAULT_ZOOM = 0.5
@@ -105,6 +112,8 @@ def _short_type(full_type):
def _detect_device_profile():
for kit_name, profile in DEVICE_PROFILES.items():
if kit_name in app_state.active_schema_kits:
if kit_name == ORION_KIT and orion_portrait():
return ORION_PORTRAIT_PROFILE
return profile
return None