changed customer to studio
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"title": "Orisys Studio",
|
||||
"about_title": "About",
|
||||
"about_body": "Orisys customer desktop application\nVersion: {app_version}",
|
||||
"about_body": "Orisys Studio desktop application\nVersion: {app_version}",
|
||||
"scaffold_hint": "Scaffold shell — acquisition coming later"
|
||||
},
|
||||
"brand": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"raw_short": "raw"
|
||||
},
|
||||
"sensor": {
|
||||
"type": "Sensor type",
|
||||
"type": "Product",
|
||||
"config": "Config",
|
||||
"thumb_placeholder": "Product model"
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"app": {
|
||||
"title": "Orisys Studio",
|
||||
"about_title": "关于",
|
||||
"about_body": "Orisys 客户端桌面应用\n版本: {app_version}",
|
||||
"about_body": "Orisys Studio 桌面应用\n版本: {app_version}",
|
||||
"scaffold_hint": "脚手架界面 — 采集功能稍后加入"
|
||||
},
|
||||
"brand": {
|
||||
@@ -70,7 +70,7 @@
|
||||
"raw_short": "raw"
|
||||
},
|
||||
"sensor": {
|
||||
"type": "传感器类型",
|
||||
"type": "产品",
|
||||
"config": "配置",
|
||||
"thumb_placeholder": "产品型号"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Orisys Customer 配色规范
|
||||
# Orisys Studio 配色规范
|
||||
|
||||
本文件记录客户端的品牌配色体系、它与 UI 设计稿的关系,以及每一处有意偏离设计稿
|
||||
的理由。所有色值都存放在主题令牌文件里,控件代码中**不允许出现十六进制颜色**:
|
||||
@@ -8,7 +8,7 @@ orisys-app/shared/src/orisys_app_shared/theme/colors_dark.json
|
||||
orisys-app/shared/src/orisys_app_shared/theme/colors_light.json
|
||||
```
|
||||
|
||||
规则由 `apps/customer/tools/ui_check.py` 的 `audit_palette()` 机械校验,pytest 套件
|
||||
规则由 `apps/studio/tools/ui_check.py` 的 `audit_palette()` 机械校验,pytest 套件
|
||||
(`tests/test_ui_smoke.py::test_palette_rules_hold`)复用它,因此只有一个真值来源。
|
||||
|
||||
---
|
||||
@@ -152,8 +152,8 @@ flow_ramp = 画布色, #6E4AD0, #FA02F3, #FF8A6B, #D8FF00
|
||||
|
||||
```powershell
|
||||
$py = "D:\orisys_ws\orisys-app\.venv-build\Scripts\python.exe"
|
||||
$env:PYTHONPATH = "D:\orisys_ws\orisys-app\shared\src;D:\orisys_ws\orisys-app\apps\customer\src"
|
||||
cd D:\orisys_ws\orisys-app\apps\customer
|
||||
$env:PYTHONPATH = "D:\orisys_ws\orisys-app\shared\src;D:\orisys_ws\orisys-app\apps\studio\src"
|
||||
cd D:\orisys_ws\orisys-app\apps\studio
|
||||
|
||||
& $py tools/ui_check.py # 含 palette 规则段落
|
||||
& $py tools/ui_snapshot.py --theme dark --lang zh_CN --demo --out outputs/_snap_dark.png
|
||||
|
||||
@@ -3,9 +3,9 @@ requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "orisys-customer"
|
||||
name = "orisys-studio"
|
||||
version = "0.1.0"
|
||||
description = "Orisys customer desktop app"
|
||||
description = "Orisys Studio desktop app"
|
||||
requires-python = ">=3.10"
|
||||
authors = [{ name = "Orisys-Tech" }]
|
||||
dependencies = [
|
||||
@@ -17,7 +17,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
orisys-customer = "orisys_customer.main:main"
|
||||
orisys-studio = "orisys_studio.main:main"
|
||||
|
||||
[tool.setuptools]
|
||||
package-dir = { "" = "src" }
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Launch the Orisys customer app shell."""
|
||||
"""Launch the Orisys Studio app shell."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -18,7 +18,7 @@ import os
|
||||
|
||||
os.chdir(ROOT)
|
||||
|
||||
from orisys_customer.main import main
|
||||
from orisys_studio.main import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Orisys customer desktop application."""
|
||||
"""Orisys Studio desktop application."""
|
||||
|
||||
__version__ = "0.1.0"
|
||||
REQUIRES_SHARED_API = "0.1"
|
||||
+12
-12
@@ -1,4 +1,4 @@
|
||||
"""Main window shell for the customer app."""
|
||||
"""Main window shell for the studio app."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -34,20 +34,20 @@ from orisys_app_shared.paths import logo_path, sensor_json_path
|
||||
from orisys_app_shared.prefs import save_preferences
|
||||
from orisys_app_shared.theme import build_qss, clear_theme_cache, color
|
||||
|
||||
from orisys_customer.ui.about_dialog import AboutDialog
|
||||
from orisys_customer.ui.arrow_panel import ArrowPanel
|
||||
from orisys_customer.ui.brand_bar import BrandBar
|
||||
from orisys_customer.ui.cal_panel import CalPanel
|
||||
from orisys_customer.ui.force_plots import ForcePlotsPanel
|
||||
from orisys_customer.ui.mesh3d_panel import Mesh3dPanel
|
||||
from orisys_customer.ui.plot_settings_dialog import (
|
||||
from orisys_studio.ui.about_dialog import AboutDialog
|
||||
from orisys_studio.ui.arrow_panel import ArrowPanel
|
||||
from orisys_studio.ui.brand_bar import BrandBar
|
||||
from orisys_studio.ui.cal_panel import CalPanel
|
||||
from orisys_studio.ui.force_plots import ForcePlotsPanel
|
||||
from orisys_studio.ui.mesh3d_panel import Mesh3dPanel
|
||||
from orisys_studio.ui.plot_settings_dialog import (
|
||||
DEFAULT_PLOT_FN_MAX,
|
||||
DEFAULT_PLOT_SHEAR_MAX,
|
||||
DEFAULT_PLOT_WINDOW_SEC,
|
||||
PlotSettingsDialog,
|
||||
)
|
||||
from orisys_customer.ui.sensor_picker import SensorPickerWidget
|
||||
from orisys_customer.ui.toolbar import ToolbarWidget
|
||||
from orisys_studio.ui.sensor_picker import SensorPickerWidget
|
||||
from orisys_studio.ui.toolbar import ToolbarWidget
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -82,7 +82,7 @@ def _reveal_in_explorer(path: Path) -> None:
|
||||
subprocess.run(["xdg-open", str(folder)], check=False)
|
||||
|
||||
|
||||
class CustomerMainWindow(QMainWindow):
|
||||
class StudioMainWindow(QMainWindow):
|
||||
def __init__(self, prefs: dict[str, Any] | None = None) -> None:
|
||||
super().__init__()
|
||||
self.prefs: dict[str, Any] = dict(prefs or {})
|
||||
@@ -998,5 +998,5 @@ class CustomerMainWindow(QMainWindow):
|
||||
self._stop_preview(announce=False)
|
||||
self._stop_run(reason="user_stop")
|
||||
self._persist_prefs()
|
||||
logger.info("Customer shell closed; preferences saved")
|
||||
logger.info("Studio shell closed; preferences saved")
|
||||
super().closeEvent(event)
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Customer app entrypoint."""
|
||||
"""Studio app entrypoint."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -15,14 +15,14 @@ from orisys_app_shared.paths import prefer_local_sensor_bundles
|
||||
from orisys_app_shared.prefs import load_preferences
|
||||
from orisys_app_shared.theme import build_qss
|
||||
|
||||
from orisys_customer import REQUIRES_SHARED_API, __version__ as app_version
|
||||
from orisys_customer.app_window import CustomerMainWindow
|
||||
from orisys_studio import REQUIRES_SHARED_API, __version__ as app_version
|
||||
from orisys_studio.app_window import StudioMainWindow
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
init_logging("orisys-customer")
|
||||
init_logging("orisys-studio")
|
||||
install_exception_hooks()
|
||||
preferred = prefer_local_sensor_bundles()
|
||||
if preferred is not None:
|
||||
@@ -42,13 +42,13 @@ def main() -> int:
|
||||
set_locale(language)
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("Orisys Customer")
|
||||
app.setApplicationName("Orisys Studio")
|
||||
app.setApplicationVersion(app_version)
|
||||
app.setStyleSheet(build_qss(theme))
|
||||
|
||||
window = CustomerMainWindow(prefs=prefs)
|
||||
window = StudioMainWindow(prefs=prefs)
|
||||
window.show()
|
||||
logger.info("Customer shell started (theme=%s, language=%s)", theme, language)
|
||||
logger.info("Studio shell started (theme=%s, language=%s)", theme, language)
|
||||
return int(app.exec_())
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QDialog, QHBoxLayout, QLabel, QPushButton, QVBoxLayo
|
||||
from orisys_app_shared.i18n import t
|
||||
from orisys_app_shared.paths import logo_topbar_path
|
||||
|
||||
from orisys_customer import __version__ as app_version
|
||||
from orisys_studio import __version__ as app_version
|
||||
|
||||
|
||||
class AboutDialog(QDialog):
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
"""Brand bar shown at the top of the customer shell.
|
||||
"""Brand bar shown at the top of the studio shell.
|
||||
|
||||
A slim deep-navy rail carrying the corporate logo lockup and the product name.
|
||||
Logo colours are re-tinted at runtime so a single asset works on the brand
|
||||
@@ -1,4 +1,4 @@
|
||||
"""Shared fixtures for the customer app UI tests.
|
||||
"""Shared fixtures for the studio app UI tests.
|
||||
|
||||
The tests render real Qt widgets with the offscreen platform plugin, so they need
|
||||
no display and no camera hardware. A single ``QApplication`` is shared by the
|
||||
@@ -36,10 +36,10 @@ def qt_app():
|
||||
|
||||
@pytest.fixture
|
||||
def make_window(qt_app, tmp_path, monkeypatch):
|
||||
"""Build a ``CustomerMainWindow`` whose preference writes stay in tmp_path."""
|
||||
"""Build a ``StudioMainWindow`` whose preference writes stay in tmp_path."""
|
||||
from orisys_app_shared import prefs as prefs_pkg
|
||||
from orisys_app_shared import paths as paths_mod
|
||||
from orisys_customer.app_window import CustomerMainWindow
|
||||
from orisys_studio.app_window import StudioMainWindow
|
||||
|
||||
prefs_file = tmp_path / "preference.json"
|
||||
monkeypatch.setattr(paths_mod, "preference_path", lambda: prefs_file)
|
||||
@@ -57,7 +57,7 @@ def make_window(qt_app, tmp_path, monkeypatch):
|
||||
def _make(**overrides):
|
||||
data = dict(default_prefs)
|
||||
data.update(overrides)
|
||||
window = CustomerMainWindow(prefs=data)
|
||||
window = StudioMainWindow(prefs=data)
|
||||
created.append(window)
|
||||
return window
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Dependency-free smoke run for the customer UI.
|
||||
"""Dependency-free smoke run for the studio UI.
|
||||
|
||||
``pytest`` is the canonical runner (``apps/customer/tests``), but this script
|
||||
``pytest`` is the canonical runner (``apps/studio/tests``), but this script
|
||||
needs nothing beyond the app's own runtime dependencies, so it can be used in
|
||||
minimal environments:
|
||||
|
||||
@@ -100,7 +100,7 @@ GRAPHIC_PAIRS: tuple[tuple[str, tuple[str, ...]], ...] = (
|
||||
|
||||
VIZ_KEYS = ("plot_fn", "plot_fx", "plot_fy")
|
||||
|
||||
# Deliberate, documented exemptions (see apps/customer/docs/ui-palette.md):
|
||||
# Deliberate, documented exemptions (see apps/studio/docs/ui-palette.md):
|
||||
# decorative 1px container outlines, and disabled states which WCAG 1.4.3
|
||||
# explicitly exempts.
|
||||
DECORATIVE_PAIRS: tuple[tuple[str, tuple[str, ...]], ...] = (
|
||||
@@ -261,7 +261,7 @@ def main() -> int:
|
||||
from orisys_app_shared.force.calibration_io import CalSample
|
||||
from orisys_app_shared.i18n import set_locale, t
|
||||
from orisys_app_shared.theme import build_qss, load_colors
|
||||
from orisys_customer.app_window import CustomerMainWindow
|
||||
from orisys_studio.app_window import StudioMainWindow
|
||||
|
||||
app = QApplication.instance() or QApplication(sys.argv)
|
||||
set_locale("zh_CN")
|
||||
@@ -297,7 +297,7 @@ def main() -> int:
|
||||
section(f"window {theme}/{sensor}")
|
||||
scene_count += 1
|
||||
app.setStyleSheet(build_qss(theme))
|
||||
window = CustomerMainWindow(
|
||||
window = StudioMainWindow(
|
||||
prefs={
|
||||
"language": "zh_CN",
|
||||
"theme": theme,
|
||||
@@ -401,7 +401,7 @@ def main() -> int:
|
||||
|
||||
section("small window")
|
||||
app.setStyleSheet(build_qss("dark"))
|
||||
window = CustomerMainWindow(
|
||||
window = StudioMainWindow(
|
||||
prefs={
|
||||
"language": "en_US",
|
||||
"theme": "dark",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Render the customer UI offscreen to PNG files for visual review.
|
||||
"""Render the studio UI offscreen to PNG files for visual review.
|
||||
|
||||
The tool never opens a camera and never starts acquisition: it builds the real
|
||||
main window, optionally injects deterministic demo data, then grabs the window.
|
||||
@@ -63,7 +63,7 @@ def _demo_data(window) -> None:
|
||||
)
|
||||
from orisys_app_shared.theme import color
|
||||
|
||||
from orisys_customer.app_window import _bgr_to_qimage
|
||||
from orisys_studio.app_window import _bgr_to_qimage
|
||||
|
||||
size = 320
|
||||
grid_y, grid_x = np.mgrid[0:size, 0:size].astype(np.float32)
|
||||
@@ -110,7 +110,7 @@ def main() -> int:
|
||||
|
||||
from orisys_app_shared.i18n import set_locale
|
||||
from orisys_app_shared.theme import build_qss
|
||||
from orisys_customer.app_window import CustomerMainWindow
|
||||
from orisys_studio.app_window import StudioMainWindow
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
set_locale(args.lang)
|
||||
@@ -125,7 +125,7 @@ def main() -> int:
|
||||
"show_fps": True,
|
||||
"image_view_mode": args.view,
|
||||
}
|
||||
window = CustomerMainWindow(prefs=prefs)
|
||||
window = StudioMainWindow(prefs=prefs)
|
||||
window.resize(width, height)
|
||||
window.show()
|
||||
app.processEvents()
|
||||
|
||||
Reference in New Issue
Block a user