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:
@@ -175,6 +175,33 @@ class DeviceSession:
|
||||
for cid in parent.children
|
||||
if self.sox_client.cache_get(cid) is not None]
|
||||
|
||||
def find_component_of_type(self, type_name, slot_name):
|
||||
"""A component of `type_name` with `slot_name` read, loading where services live.
|
||||
|
||||
Nothing is loaded until a folder is opened, so a platform service the user never
|
||||
expanded to is not cached yet. It sits one or two levels down (/service/plat), and
|
||||
those are loaded to find it rather than the whole app.
|
||||
"""
|
||||
client = self.sox_client
|
||||
if client is None:
|
||||
return None
|
||||
|
||||
def cached():
|
||||
return next((c for c in client.cache
|
||||
if c is not None and c.type_name == type_name), None)
|
||||
|
||||
comp = cached()
|
||||
if comp is None:
|
||||
for top in self.load_children(0):
|
||||
if top.name == "service" or top.type_name == type_name:
|
||||
for child in self.load_children(top.id):
|
||||
if child.children and child.type_name != type_name:
|
||||
self.load_children(child.id)
|
||||
comp = cached()
|
||||
if comp is not None and slot_name not in comp.values:
|
||||
client.update([comp], CONFIG)
|
||||
return comp
|
||||
|
||||
# ── Wiresheet Open / Close ──────────────────────────────────
|
||||
|
||||
def open_wiresheet(self, folder_comp_id):
|
||||
|
||||
Reference in New Issue
Block a user