ok-script 3.0.6__tar.gz → 3.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ok_script-3.0.6/ok_script.egg-info → ok_script-3.0.7}/PKG-INFO +1 -3
- {ok_script-3.0.6 → ok_script-3.0.7}/README.md +0 -2
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/__init__.py +2 -1
- ok_script-3.0.7/ok/ui/qt/kit/table.py +312 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/tasks_page.py +3 -19
- {ok_script-3.0.6 → ok_script-3.0.7/ok_script.egg-info}/PKG-INFO +1 -3
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/SOURCES.txt +1 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_kit.py +86 -3
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_tasks_page.py +2 -1
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/develop/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/develop/agents/openai.yaml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/develop/references/windows-input.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/generate-templates/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/reload-tasks/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/reload-tasks/agents/openai.yaml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-env/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-env/agents/openai.yaml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-env/assets/ok-script-develop/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-project/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-project/agents/openai.yaml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/use_venv/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/write-test/SKILL.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/write-test/agents/openai.yaml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/LICENSE.txt +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/MANIFEST.in +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/diagnostics/qq_trace.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/docs/agent-setup.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/docs/feature-crops.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/docs/mcp.md +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/examples/mcp_observe.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/__main__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/alas/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/alas/emulator_base.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/alas/emulator_windows.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/alas/platform_windows.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/alas/utils.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/assets/default-icon.png +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/deep.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/minitouch.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/nemu_ipc.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/nemu_utils.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/pool.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/timer.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/adb/util.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/windows/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/windows/d3d11.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/capture/windows/dump.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/cli.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/capture_labels.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/code_runner.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/config_schema.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/downloads.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/events.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/icons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/mcp_runner.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/mcp_server.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/notifications.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/plugin_staging.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/plugins.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/screenshot.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/script_editing.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/script_packager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/script_templates.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/skills.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/start_controller.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/task_manager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/template_store.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/translation.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/core/ui_config.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/DeviceManager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/browser_audio.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/adb.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/base.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/bitblt.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/bitblt_utils.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/browser.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/desktop_duplication.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/hwnd_window.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/image.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/nemu_ipc.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/types.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/update.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/windows_graphics.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/capture_methods/windows_graphics_hdr.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/adb.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/base.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/browser.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/do_nothing.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/foreground_post_message.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/genshin.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/keys.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/post_message.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/pydirect.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/pynput.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/interaction_methods/swipe.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/device/intercation.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/feature/Box.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/feature/Feature.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/feature/FeatureSet.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/feature/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/gui/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/gui/util/pyappify_startup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/manager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/messenger_images.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/pipeline.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/ppocr.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/providers.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/system.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/notification/windows_messenger.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ocr/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ocr/download_paddle_model.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Foundation/Collections.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Foundation/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Globalization/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Graphics/Capture/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Graphics/DirectX/Direct3D11/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Graphics/DirectX/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Graphics/Imaging/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Graphics/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Media/Ocr/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Media/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Security/Cryptography/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Security/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Storage/Streams/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/Storage/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/UI/ViewManagement/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/UI/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/Windows/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/delegate.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/export.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/idldsl.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/inspectable.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/roapi.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/types.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/rotypes/winstring.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/task/DiagnosisTask.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/task/TaskExecutor.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/task/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/task/exceptions.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/task/task.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/test/OKTestRunner.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/test/RunTests.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/test/TaskTestCase.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/test/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/third_party/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/third_party/paperclip.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/overlay/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/overlay/win32_gdi.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/Communicate.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/MainWindow.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/MessageWindow.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/StartController.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/about/AboutTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/about/UpdateCard.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/about/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/common/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/common/config.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/debug/OverlayWidget.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/debug/Screenshot.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/debug/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/debug/diagnosis_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/events.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/GettextTranslator.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/en_US.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/en_US.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/es_ES.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/es_ES.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/ja_JP.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/ja_JP.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/ko_KR.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/ko_KR.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/path.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/update.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/zh_CN.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/zh_CN.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/zh_TW.qm +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/i18n/zh_TW.ts +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/buttons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/cards.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/dialogs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/feedback.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/gallery.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/icons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/inputs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/labels.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/layout.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/mica.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/motion.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/navigation.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/options.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/popover.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/qss.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/switch.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/tabs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/theme.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/kit/window.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/overlay/OverlayWindow.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/overlay/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/plugins/PluginTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/plugins/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/plugins/imported_tabs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/qt.qrc +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/resources.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/settings/GlobalConfigTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/settings/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/settings/config_section.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/settings/settings_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/connection.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/diagnostics.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/lazy_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/log_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/nav_icons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/shell/run_bar.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/start/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/EditTaskTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/MarkUpWindow.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/ModifyListDialog.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/PythonHighlighter.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/RecordScript.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/ScheduleTaskTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/ScriptPackager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/TaskManger.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/TaskOpButton.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/TemplateFactory.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/TemplateTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/config_editors.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/config_form.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/mouse_buttons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/tasks/schedule_index_sync.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/Alert.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/InitWorker.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/app.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/download.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/pip_util.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/pyappify_startup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/touch_scroll.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/util/windows_thumbnail.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/Card.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/CustomTab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/FlowLayout.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/ImageWidget.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/ImportWarningDialog.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/ListTableWidgetItem.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/NumericTableWidgetItem.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/SortingTableWidgetItem.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/StartLoadingDialog.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/Tab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/TabWidget.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/UpdateConfigWidgetItem.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/YesNonWidgetItem.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/ui/qt/widget/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/update/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/update/copy_ok_folder.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/update/inline_ok_requirements.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/Analytics.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/GlobalConfig.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/__init__.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/blur.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/clazz.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/collection.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/color.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/config.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/explorer.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/file.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/gpu_driver_settings.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/handler.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/i18n.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/logger.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/partial_sync_repo.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/print_hwnd.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/process.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/shortcut.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/version.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/window.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok/util/windows_schedule.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/dependency_links.txt +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/entry_points.txt +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/not-zip-safe +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/requires.txt +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/ok_script.egg-info/top_level.txt +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/pyproject.toml +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/setup.cfg +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/setup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_app.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_base_interaction.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_blur.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_box.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_browser_audio.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_browser_audio_playwright.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_browser_geometry.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_browser_launch_options.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_browser_pointer_lock_playwright.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_capture_update.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_cli.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_core_events.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_core_ui_services.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_device_manager.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_diagnosis_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_executor_jobs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_explorer.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_global_config.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_gpu_driver_settings.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_handler.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_headless_imports.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_inline_ok_requirements.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_lazy_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_log_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_logger.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_main_window_notifications.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_main_window_startup_tab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_main_window_system_theme.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_markup_window.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_mcp_cleanup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_mcp_runner.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_mcp_server.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_mcp_setting.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_missing_frame.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_mouse_buttons.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_navigation_state.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_nemu_ipc_capture.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_notifications.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_ok_mutex.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_overlay_custom_draw.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_overlay_lifecycle.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_package_metadata.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_plugin_staging.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_plugin_tabs.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_plugins.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_process.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_process_mutex.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_pyappify_startup_update.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_qt_events.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_qt_page_layout.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_runtime_startup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_schedule_startup.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_schedule_task_index_sync.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_screenshot_naming.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_screenshot_rendering.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_settings_page.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_shell.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_shortcut.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_skills.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_start_controller.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_task_executor_next_frame.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_task_executor_queue.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_task_reloading.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_template_compression.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_template_generation.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_template_tab.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_touch_scroll.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_translation_fallback.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_ui_config.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_version.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_windows_graphics_capture.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_windows_graphics_hdr.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_windows_schedule_target_parse.py +0 -0
- {ok_script-3.0.6 → ok_script-3.0.7}/tests/test_windows_schedule_xml.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.7
|
|
4
4
|
Summary: Vibe Coding Automation Framework
|
|
5
5
|
Author-email: ok-oldking <firedcto@gmail.com>
|
|
6
6
|
License: ok-script License
|
|
@@ -246,9 +246,7 @@ python -m venv .venv
|
|
|
246
246
|
- [卡厄思梦境](https://github.com/baoxin1100/ok-kes)
|
|
247
247
|
- [蓝色星原:旅谣](https://github.com/longer-sausage/OK-AzurPromilia)
|
|
248
248
|
- [阴阳师](https://github.com/YunLiuZ/ok-Onmyoji)
|
|
249
|
-
- [原神](https://github.com/ok-oldking/ok-genshin-impact)(停止维护,后台过剧情仍可用)
|
|
250
249
|
- [白荆回廊](https://github.com/ok-oldking/ok-baijing)(停止维护)
|
|
251
|
-
- [崩坏:星穹铁道](https://github.com/Shasnow/ok-starrailassistant)(停止维护)
|
|
252
250
|
|
|
253
251
|
## 开发 ok-script
|
|
254
252
|
|
|
@@ -122,9 +122,7 @@ python -m venv .venv
|
|
|
122
122
|
- [卡厄思梦境](https://github.com/baoxin1100/ok-kes)
|
|
123
123
|
- [蓝色星原:旅谣](https://github.com/longer-sausage/OK-AzurPromilia)
|
|
124
124
|
- [阴阳师](https://github.com/YunLiuZ/ok-Onmyoji)
|
|
125
|
-
- [原神](https://github.com/ok-oldking/ok-genshin-impact)(停止维护,后台过剧情仍可用)
|
|
126
125
|
- [白荆回廊](https://github.com/ok-oldking/ok-baijing)(停止维护)
|
|
127
|
-
- [崩坏:星穹铁道](https://github.com/Shasnow/ok-starrailassistant)(停止维护)
|
|
128
126
|
|
|
129
127
|
## 开发 ok-script
|
|
130
128
|
|
|
@@ -18,6 +18,7 @@ from ok.ui.qt.kit.navigation import NavigationView, NavItem
|
|
|
18
18
|
from ok.ui.qt.kit.options import OptionCard, OptionGroup
|
|
19
19
|
from ok.ui.qt.kit.popover import Popover
|
|
20
20
|
from ok.ui.qt.kit.switch import Switch
|
|
21
|
+
from ok.ui.qt.kit.table import Table
|
|
21
22
|
from ok.ui.qt.kit.tabs import TabItem, TabStrip
|
|
22
23
|
from ok.ui.qt.kit.theme import Theme, theme
|
|
23
24
|
from ok.ui.qt.kit.window import ContentLayer, KitWindow, TitleBar
|
|
@@ -26,6 +27,6 @@ __all__ = [
|
|
|
26
27
|
"AnimatedStackedWidget", "Button", "Card", "ComboBox", "ContentLayer", "Dialog", "FlowLayout", "ICON_NAMES", "KitWindow", "Label",
|
|
27
28
|
"NavItem",
|
|
28
29
|
"NavigationView", "NumberBox", "OptionCard", "OptionGroup", "Pill", "Popover", "ProgressRing", "SettingGroup",
|
|
29
|
-
"SettingRow", "StatusDot", "Switch", "TabItem", "TabStrip", "Theme", "TitleBar", "Toast", "confirm", "icon",
|
|
30
|
+
"SettingRow", "StatusDot", "Switch", "TabItem", "TabStrip", "Table", "Theme", "TitleBar", "Toast", "confirm", "icon",
|
|
30
31
|
"load_icon", "set_toast_anchor", "set_toast_top_margin", "show_toast", "theme",
|
|
31
32
|
]
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
"""Table widget with the kit theme, rounded headers and overlay scrolling."""
|
|
2
|
+
|
|
3
|
+
from PySide6.QtCore import QEvent, QPointF, QRect, QRectF, QSignalBlocker, Qt
|
|
4
|
+
from PySide6.QtGui import QBrush, QColor, QCursor, QPainter, QPainterPath, QPolygonF
|
|
5
|
+
from PySide6.QtWidgets import (
|
|
6
|
+
QHeaderView,
|
|
7
|
+
QScrollBar,
|
|
8
|
+
QStyle,
|
|
9
|
+
QStyledItemDelegate,
|
|
10
|
+
QStyleOptionSlider,
|
|
11
|
+
QStyleOptionViewItem,
|
|
12
|
+
QTableWidget,
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
from ok.ui.qt.kit.theme import theme
|
|
16
|
+
|
|
17
|
+
FRAME_WIDTH = 1
|
|
18
|
+
FRAME_RADIUS = 10
|
|
19
|
+
INNER_RADIUS = FRAME_RADIUS - FRAME_WIDTH
|
|
20
|
+
SELECTION_ALPHA = 0.18 # Matches the stylesheet's accent_soft_strong selection.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _rounded_path(rect: QRectF, top_left: bool, top_right: bool, bottom_left: bool, bottom_right: bool,
|
|
24
|
+
radius: float = INNER_RADIUS) -> QPainterPath:
|
|
25
|
+
"""Return ``rect`` with only the requested corners rounded."""
|
|
26
|
+
path = QPainterPath()
|
|
27
|
+
path.addRect(rect)
|
|
28
|
+
diameter = radius * 2
|
|
29
|
+
corners = (
|
|
30
|
+
(top_left, QRectF(rect.left(), rect.top(), radius, radius),
|
|
31
|
+
QRectF(rect.left(), rect.top(), diameter, diameter)),
|
|
32
|
+
(top_right, QRectF(rect.right() - radius, rect.top(), radius, radius),
|
|
33
|
+
QRectF(rect.right() - diameter, rect.top(), diameter, diameter)),
|
|
34
|
+
(bottom_left, QRectF(rect.left(), rect.bottom() - radius, radius, radius),
|
|
35
|
+
QRectF(rect.left(), rect.bottom() - diameter, diameter, diameter)),
|
|
36
|
+
(bottom_right, QRectF(rect.right() - radius, rect.bottom() - radius, radius, radius),
|
|
37
|
+
QRectF(rect.right() - diameter, rect.bottom() - diameter, diameter, diameter)),
|
|
38
|
+
)
|
|
39
|
+
for rounded, square, circle in corners:
|
|
40
|
+
if rounded:
|
|
41
|
+
outside = QPainterPath()
|
|
42
|
+
outside.addRect(square)
|
|
43
|
+
arc = QPainterPath()
|
|
44
|
+
arc.addEllipse(circle)
|
|
45
|
+
path = path.subtracted(outside.subtracted(arc))
|
|
46
|
+
return path
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Table(QTableWidget):
|
|
50
|
+
"""A styled table that keeps the native QTableWidget model and interaction.
|
|
51
|
+
|
|
52
|
+
Colors, frame and padding come from the kit stylesheet; this class only
|
|
53
|
+
adds the rounded clipping, row hover and the overlay vertical scrollbar.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
def __init__(self, *args, **kwargs):
|
|
57
|
+
super().__init__(*args, **kwargs)
|
|
58
|
+
self._hovered_row = -1
|
|
59
|
+
self._round_top = False
|
|
60
|
+
self._round_bottom = False
|
|
61
|
+
self._viewport_clip = None
|
|
62
|
+
self._scrollbar_overlay = _TableScrollBar(self)
|
|
63
|
+
self._scrollbar_overlay.hide()
|
|
64
|
+
self.setMouseTracking(True)
|
|
65
|
+
self.setShowGrid(False)
|
|
66
|
+
self.setVerticalScrollMode(self.ScrollMode.ScrollPerPixel)
|
|
67
|
+
self.setVerticalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
|
68
|
+
scroll = self.verticalScrollBar()
|
|
69
|
+
scroll.rangeChanged.connect(self._sync_scrollbar)
|
|
70
|
+
scroll.valueChanged.connect(self._scrollbar_overlay.setValue)
|
|
71
|
+
self._scrollbar_overlay.valueChanged.connect(scroll.setValue)
|
|
72
|
+
self.setHorizontalHeader(_TableHeader(self))
|
|
73
|
+
self.setItemDelegate(_TableItemDelegate(self))
|
|
74
|
+
# The stylesheet would paint selections unclipped; the delegate draws them inside the frame.
|
|
75
|
+
self.setStyleSheet("QTableWidget { selection-background-color: transparent; }")
|
|
76
|
+
|
|
77
|
+
def viewportEvent(self, event):
|
|
78
|
+
if event.type() in (QEvent.Type.Enter, QEvent.Type.MouseMove):
|
|
79
|
+
self._set_hovered_row(self.rowAt(event.position().toPoint().y()))
|
|
80
|
+
elif event.type() == QEvent.Type.Leave:
|
|
81
|
+
self._set_hovered_row(-1)
|
|
82
|
+
return super().viewportEvent(event)
|
|
83
|
+
|
|
84
|
+
def updateGeometries(self):
|
|
85
|
+
super().updateGeometries()
|
|
86
|
+
self._sync_scrollbar()
|
|
87
|
+
overlay = self._scrollbar_overlay
|
|
88
|
+
bounds = self.viewport().geometry()
|
|
89
|
+
width = overlay.sizeHint().width()
|
|
90
|
+
overlay.setGeometry(bounds.right() + 1 - width, bounds.top(), width, bounds.height())
|
|
91
|
+
overlay.raise_()
|
|
92
|
+
self._update_viewport_clip()
|
|
93
|
+
|
|
94
|
+
def _sync_scrollbar(self, *_):
|
|
95
|
+
# Mirror the table's vertical controller in a scrollbar over its right edge.
|
|
96
|
+
scroll = self.verticalScrollBar()
|
|
97
|
+
overlay = self._scrollbar_overlay
|
|
98
|
+
with QSignalBlocker(overlay):
|
|
99
|
+
overlay.setPageStep(scroll.pageStep())
|
|
100
|
+
overlay.setSingleStep(scroll.singleStep())
|
|
101
|
+
overlay.setRange(scroll.minimum(), scroll.maximum())
|
|
102
|
+
overlay.setValue(scroll.value())
|
|
103
|
+
visible = scroll.maximum() > scroll.minimum()
|
|
104
|
+
if visible == overlay.isHidden():
|
|
105
|
+
overlay.setVisible(visible)
|
|
106
|
+
# Cells under the scrollbar inset their content while it is shown.
|
|
107
|
+
self.viewport().update()
|
|
108
|
+
|
|
109
|
+
def _update_viewport_clip(self):
|
|
110
|
+
# Round only the viewport corners that meet the frame's rounded corners.
|
|
111
|
+
no_left = not self.verticalHeader().isVisibleTo(self)
|
|
112
|
+
self._round_top = not self.horizontalHeader().isVisibleTo(self)
|
|
113
|
+
self._round_bottom = not self.horizontalScrollBar().isVisibleTo(self)
|
|
114
|
+
if not (self._round_top or self._round_bottom):
|
|
115
|
+
self._viewport_clip = None
|
|
116
|
+
return
|
|
117
|
+
self._viewport_clip = _rounded_path(
|
|
118
|
+
QRectF(self.viewport().rect()),
|
|
119
|
+
self._round_top and no_left, self._round_top,
|
|
120
|
+
self._round_bottom and no_left, self._round_bottom,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
def _cell_clip(self, cell: QRect):
|
|
124
|
+
"""The rounded clip for a cell touching a rounded corner, else None."""
|
|
125
|
+
if self._viewport_clip is None:
|
|
126
|
+
return None
|
|
127
|
+
height = self.viewport().height()
|
|
128
|
+
if (self._round_top and cell.top() < INNER_RADIUS) or (
|
|
129
|
+
self._round_bottom and cell.bottom() >= height - INNER_RADIUS):
|
|
130
|
+
return self._viewport_clip
|
|
131
|
+
return None
|
|
132
|
+
|
|
133
|
+
def _overlay_inset(self, cell: QRect) -> int:
|
|
134
|
+
"""Pixels of ``cell`` covered by the overlay scrollbar."""
|
|
135
|
+
overlay = self._scrollbar_overlay
|
|
136
|
+
if overlay.isHidden():
|
|
137
|
+
return 0
|
|
138
|
+
return max(0, cell.right() + 1 - (self.viewport().width() - overlay.width()))
|
|
139
|
+
|
|
140
|
+
def _is_last_column(self, column: int) -> bool:
|
|
141
|
+
header = self.horizontalHeader()
|
|
142
|
+
for visual in range(header.count() - 1, -1, -1):
|
|
143
|
+
logical = header.logicalIndex(visual)
|
|
144
|
+
if not header.isSectionHidden(logical):
|
|
145
|
+
return logical == column
|
|
146
|
+
return False
|
|
147
|
+
|
|
148
|
+
def scrollContentsBy(self, dx, dy):
|
|
149
|
+
super().scrollContentsBy(dx, dy)
|
|
150
|
+
viewport = self.viewport()
|
|
151
|
+
if self._viewport_clip is not None:
|
|
152
|
+
# Qt blits scrolled pixels, carrying clipped corners into the view; repaint those bands.
|
|
153
|
+
if dx:
|
|
154
|
+
viewport.update()
|
|
155
|
+
elif dy:
|
|
156
|
+
band = INNER_RADIUS + abs(dy)
|
|
157
|
+
width, height = viewport.width(), viewport.height()
|
|
158
|
+
if self._round_top:
|
|
159
|
+
viewport.update(0, 0, width, band)
|
|
160
|
+
if self._round_bottom:
|
|
161
|
+
viewport.update(0, height - band, width, band)
|
|
162
|
+
if viewport.underMouse():
|
|
163
|
+
self._set_hovered_row(self.rowAt(viewport.mapFromGlobal(QCursor.pos()).y()))
|
|
164
|
+
|
|
165
|
+
def _set_hovered_row(self, row):
|
|
166
|
+
if self._hovered_row != row:
|
|
167
|
+
self._hovered_row = row
|
|
168
|
+
self.viewport().update()
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class _TableScrollBar(QScrollBar):
|
|
172
|
+
"""Use Qt's scroll controls with a compact thumb and a track on hover."""
|
|
173
|
+
|
|
174
|
+
def __init__(self, parent=None):
|
|
175
|
+
super().__init__(Qt.Orientation.Vertical, parent)
|
|
176
|
+
# Keep the hit areas and slider geometry identical in both visual states.
|
|
177
|
+
self.setStyleSheet("""
|
|
178
|
+
QScrollBar:vertical { background: transparent; width: 14px; margin: 14px 0; }
|
|
179
|
+
QScrollBar::handle:vertical { min-height: 24px; margin: 0; }
|
|
180
|
+
QScrollBar::sub-line:vertical, QScrollBar::add-line:vertical {
|
|
181
|
+
subcontrol-origin: margin; width: 14px; height: 14px;
|
|
182
|
+
}
|
|
183
|
+
QScrollBar::sub-line:vertical { subcontrol-position: top; }
|
|
184
|
+
QScrollBar::add-line:vertical { subcontrol-position: bottom; }
|
|
185
|
+
""")
|
|
186
|
+
self.setAttribute(Qt.WidgetAttribute.WA_OpaquePaintEvent, False)
|
|
187
|
+
self.sliderReleased.connect(self.update)
|
|
188
|
+
|
|
189
|
+
def enterEvent(self, event):
|
|
190
|
+
super().enterEvent(event)
|
|
191
|
+
self.update()
|
|
192
|
+
|
|
193
|
+
def leaveEvent(self, event):
|
|
194
|
+
super().leaveEvent(event)
|
|
195
|
+
self.update()
|
|
196
|
+
|
|
197
|
+
def paintEvent(self, _event):
|
|
198
|
+
option = QStyleOptionSlider()
|
|
199
|
+
self.initStyleOption(option)
|
|
200
|
+
control = QStyle.ComplexControl.CC_ScrollBar
|
|
201
|
+
sub = QStyle.SubControl
|
|
202
|
+
style = self.style()
|
|
203
|
+
slider = QRectF(style.subControlRect(control, option, sub.SC_ScrollBarSlider, self))
|
|
204
|
+
expanded = self.underMouse() or self.isSliderDown()
|
|
205
|
+
|
|
206
|
+
painter = QPainter(self)
|
|
207
|
+
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
|
208
|
+
painter.setPen(Qt.PenStyle.NoPen)
|
|
209
|
+
if expanded:
|
|
210
|
+
painter.setBrush(theme.color("control" if theme.is_dark() else "control_hover"))
|
|
211
|
+
painter.drawRoundedRect(QRectF(self.rect()).adjusted(0, 1, 0, -1), 7, 7)
|
|
212
|
+
for button, direction, limit in (
|
|
213
|
+
(sub.SC_ScrollBarSubLine, -1, self.minimum()),
|
|
214
|
+
(sub.SC_ScrollBarAddLine, 1, self.maximum()),
|
|
215
|
+
):
|
|
216
|
+
center = QRectF(style.subControlRect(control, option, button, self)).center()
|
|
217
|
+
x, y = center.x(), center.y()
|
|
218
|
+
painter.setBrush(
|
|
219
|
+
theme.color("text_disabled" if self.value() == limit else "text_secondary")
|
|
220
|
+
)
|
|
221
|
+
painter.drawPolygon(
|
|
222
|
+
QPolygonF(
|
|
223
|
+
[
|
|
224
|
+
QPointF(x - 4, y - direction * 2.5),
|
|
225
|
+
QPointF(x + 4, y - direction * 2.5),
|
|
226
|
+
QPointF(x, y + direction * 2.5),
|
|
227
|
+
]
|
|
228
|
+
)
|
|
229
|
+
)
|
|
230
|
+
width = 6 if expanded else 2
|
|
231
|
+
center_x = slider.center().x() if expanded else slider.right() - 4
|
|
232
|
+
slider = QRectF(center_x - width / 2, slider.top(), width, slider.height())
|
|
233
|
+
painter.setBrush(theme.color("text_secondary" if expanded else "text_tertiary"))
|
|
234
|
+
painter.drawRoundedRect(slider, slider.width() / 2, slider.width() / 2)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class _TableItemDelegate(QStyledItemDelegate):
|
|
238
|
+
def paint(self, painter, option, index):
|
|
239
|
+
table = self.parent()
|
|
240
|
+
option = QStyleOptionViewItem(option)
|
|
241
|
+
self.initStyleOption(option, index)
|
|
242
|
+
cell = QRect(option.rect)
|
|
243
|
+
viewport = table.viewport().rect()
|
|
244
|
+
painter.save()
|
|
245
|
+
clip = table._cell_clip(cell)
|
|
246
|
+
if clip is not None:
|
|
247
|
+
antialiasing = QPainter.RenderHint.Antialiasing
|
|
248
|
+
was_antialiased = painter.testRenderHint(antialiasing)
|
|
249
|
+
painter.setRenderHint(antialiasing)
|
|
250
|
+
painter.setClipPath(clip, Qt.ClipOperation.IntersectClip)
|
|
251
|
+
painter.setRenderHint(antialiasing, was_antialiased)
|
|
252
|
+
|
|
253
|
+
# Paint the background across the whole cell, then the content beside the scrollbar.
|
|
254
|
+
state = QStyle.StateFlag
|
|
255
|
+
features = QStyleOptionViewItem.ViewItemFeature
|
|
256
|
+
if option.state & state.State_Selected:
|
|
257
|
+
background = QColor(theme.accent())
|
|
258
|
+
background.setAlphaF(SELECTION_ALPHA)
|
|
259
|
+
background = QBrush(background)
|
|
260
|
+
elif index.row() == table._hovered_row:
|
|
261
|
+
background = QBrush(theme.color("control" if theme.is_dark() else "control_hover"))
|
|
262
|
+
elif option.backgroundBrush.style() != Qt.BrushStyle.NoBrush:
|
|
263
|
+
background = option.backgroundBrush
|
|
264
|
+
elif option.features & features.Alternate:
|
|
265
|
+
background = option.palette.alternateBase()
|
|
266
|
+
else:
|
|
267
|
+
background = None
|
|
268
|
+
if background is not None:
|
|
269
|
+
painter.fillRect(cell, background)
|
|
270
|
+
option.state &= ~(state.State_Selected | state.State_HasFocus | state.State_MouseOver)
|
|
271
|
+
option.features &= ~features.Alternate
|
|
272
|
+
option.backgroundBrush = QBrush()
|
|
273
|
+
option.rect = cell.adjusted(0, 0, -table._overlay_inset(cell), 0)
|
|
274
|
+
option.widget.style().drawControl(
|
|
275
|
+
QStyle.ControlElement.CE_ItemViewItem, option, painter, option.widget
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
# Inner dividers only: none right of the last column or along the frame.
|
|
279
|
+
painter.setPen(theme.color("border"))
|
|
280
|
+
if not table._is_last_column(index.column()) and cell.right() < viewport.right():
|
|
281
|
+
painter.drawLine(cell.topRight(), cell.bottomRight())
|
|
282
|
+
if cell.bottom() < viewport.bottom():
|
|
283
|
+
painter.drawLine(cell.bottomLeft(), cell.bottomRight())
|
|
284
|
+
painter.restore()
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
class _TableHeader(QHeaderView):
|
|
288
|
+
"""Header with a rounded top surface and no dividers between sections."""
|
|
289
|
+
|
|
290
|
+
def __init__(self, parent=None):
|
|
291
|
+
super().__init__(Qt.Orientation.Horizontal, parent)
|
|
292
|
+
# Sections keep Qt's painting (text, icons, sort indicator) over a surface drawn below.
|
|
293
|
+
self.setStyleSheet(
|
|
294
|
+
"QHeaderView { background: transparent; border: 0; border-radius: 0; }"
|
|
295
|
+
"QHeaderView::section { background: transparent; border: 0; }"
|
|
296
|
+
)
|
|
297
|
+
self.viewport().setAutoFillBackground(False)
|
|
298
|
+
|
|
299
|
+
def paintEvent(self, event):
|
|
300
|
+
rect = self.viewport().rect()
|
|
301
|
+
table = self.parentWidget()
|
|
302
|
+
round_left = table is None or not table.verticalHeader().isVisibleTo(table)
|
|
303
|
+
path = _rounded_path(QRectF(rect), round_left, True, False, False)
|
|
304
|
+
# Paint the rounded surface in viewport coordinates, independently of section widths.
|
|
305
|
+
with QPainter(self.viewport()) as painter:
|
|
306
|
+
painter.setRenderHint(QPainter.RenderHint.Antialiasing)
|
|
307
|
+
painter.fillPath(path, theme.color("surface_alt"))
|
|
308
|
+
# A 1px line on integer coordinates must not be antialiased, or it blurs over two rows.
|
|
309
|
+
painter.setRenderHint(QPainter.RenderHint.Antialiasing, False)
|
|
310
|
+
painter.setPen(theme.color("border"))
|
|
311
|
+
painter.drawLine(rect.bottomLeft(), rect.bottomRight())
|
|
312
|
+
super().paintEvent(event)
|
|
@@ -14,7 +14,7 @@ import time
|
|
|
14
14
|
from PySide6.QtCore import QCoreApplication, QEvent, QSize, Qt, QTimer, Signal
|
|
15
15
|
from PySide6.QtGui import QFontMetrics
|
|
16
16
|
from PySide6.QtWidgets import (QAbstractItemView, QFrame, QHBoxLayout, QHeaderView, QLabel, QMenu, QPushButton,
|
|
17
|
-
QScrollArea, QSizePolicy,
|
|
17
|
+
QScrollArea, QSizePolicy, QTableWidgetItem, QVBoxLayout,
|
|
18
18
|
QWidget)
|
|
19
19
|
|
|
20
20
|
from ok import Logger, og
|
|
@@ -27,6 +27,7 @@ from ok.ui.qt.kit.icons import icon as kit_icon, tinted_icon
|
|
|
27
27
|
from ok.ui.qt.kit.labels import Label
|
|
28
28
|
from ok.ui.qt.kit.motion import AnimatedStackedWidget
|
|
29
29
|
from ok.ui.qt.kit.switch import Switch
|
|
30
|
+
from ok.ui.qt.kit.table import Table
|
|
30
31
|
from ok.ui.qt.kit.tabs import TabStrip
|
|
31
32
|
from ok.ui.qt.kit.theme import set_style_property, theme
|
|
32
33
|
from ok.ui.qt.shell.nav_icons import FALLBACK, nav_icon
|
|
@@ -38,19 +39,6 @@ from ok.util.config import Config
|
|
|
38
39
|
logger = Logger.get_logger(__name__)
|
|
39
40
|
|
|
40
41
|
|
|
41
|
-
class _InnerGridDelegate(QStyledItemDelegate):
|
|
42
|
-
"""Draws row lines and column separators, but no line right of the last column."""
|
|
43
|
-
|
|
44
|
-
def paint(self, painter, option, index):
|
|
45
|
-
super().paint(painter, option, index)
|
|
46
|
-
rect = option.rect
|
|
47
|
-
painter.save()
|
|
48
|
-
painter.setPen(theme.color('border'))
|
|
49
|
-
painter.drawLine(rect.bottomLeft(), rect.bottomRight())
|
|
50
|
-
if index.column() < index.model().columnCount() - 1:
|
|
51
|
-
painter.drawLine(rect.topRight(), rect.bottomRight())
|
|
52
|
-
painter.restore()
|
|
53
|
-
|
|
54
42
|
LIST_WIDTH = 372
|
|
55
43
|
ROW_HEIGHT = 58
|
|
56
44
|
TRIGGER_LIST_MAX_HEIGHT = 4 * ROW_HEIGHT
|
|
@@ -573,7 +561,7 @@ class TaskDetail(QWidget):
|
|
|
573
561
|
self.form_scroll.setWidgetResizable(True)
|
|
574
562
|
self.form_scroll.setFrameShape(QFrame.Shape.NoFrame)
|
|
575
563
|
self.form_scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
|
|
576
|
-
self.info_table =
|
|
564
|
+
self.info_table = Table(0, 2)
|
|
577
565
|
self.info_table.setHorizontalHeaderLabels([_t("TaskTab", "Info"), _t("TaskTab", "Value")])
|
|
578
566
|
self.info_table.verticalHeader().hide()
|
|
579
567
|
self.info_table.horizontalHeader().setSectionResizeMode(0, QHeaderView.ResizeMode.ResizeToContents)
|
|
@@ -583,10 +571,6 @@ class TaskDetail(QWidget):
|
|
|
583
571
|
self.info_table.verticalHeader().setDefaultSectionSize(40)
|
|
584
572
|
self.info_table.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
|
|
585
573
|
self.info_table.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection)
|
|
586
|
-
# Qt's grid draws a line right of the last column too, doubling the
|
|
587
|
-
# frame's own right border; draw only the inner lines instead.
|
|
588
|
-
self.info_table.setShowGrid(False)
|
|
589
|
-
self.info_table.setItemDelegate(_InnerGridDelegate(self.info_table))
|
|
590
574
|
self.pages = AnimatedStackedWidget(Qt.Orientation.Horizontal)
|
|
591
575
|
self.pages.addWidget(self.form_scroll)
|
|
592
576
|
self.pages.addWidget(self.info_table)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ok-script
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.7
|
|
4
4
|
Summary: Vibe Coding Automation Framework
|
|
5
5
|
Author-email: ok-oldking <firedcto@gmail.com>
|
|
6
6
|
License: ok-script License
|
|
@@ -246,9 +246,7 @@ python -m venv .venv
|
|
|
246
246
|
- [卡厄思梦境](https://github.com/baoxin1100/ok-kes)
|
|
247
247
|
- [蓝色星原:旅谣](https://github.com/longer-sausage/OK-AzurPromilia)
|
|
248
248
|
- [阴阳师](https://github.com/YunLiuZ/ok-Onmyoji)
|
|
249
|
-
- [原神](https://github.com/ok-oldking/ok-genshin-impact)(停止维护,后台过剧情仍可用)
|
|
250
249
|
- [白荆回廊](https://github.com/ok-oldking/ok-baijing)(停止维护)
|
|
251
|
-
- [崩坏:星穹铁道](https://github.com/Shasnow/ok-starrailassistant)(停止维护)
|
|
252
250
|
|
|
253
251
|
## 开发 ok-script
|
|
254
252
|
|
|
@@ -7,13 +7,13 @@ from pathlib import Path
|
|
|
7
7
|
|
|
8
8
|
os.environ.setdefault("QT_QPA_PLATFORM", "offscreen")
|
|
9
9
|
|
|
10
|
-
from PySide6.QtCore import QAbstractAnimation, QEvent, QObject, QPoint, QSize, Qt, QTimer
|
|
11
|
-
from PySide6.QtGui import QColor, QIcon, QImage, QPalette
|
|
10
|
+
from PySide6.QtCore import QAbstractAnimation, QEvent, QObject, QPoint, QPointF, QSize, Qt, QTimer
|
|
11
|
+
from PySide6.QtGui import QColor, QIcon, QImage, QMouseEvent, QPalette
|
|
12
12
|
from qt_helpers import key_click, mouse_click, wait
|
|
13
13
|
from PySide6.QtWidgets import QApplication, QComboBox, QLabel, QListView, QScrollArea, QWidget
|
|
14
14
|
|
|
15
15
|
from ok.ui.qt.kit import (Button, ComboBox, Dialog, FlowLayout, ICON_NAMES, Label, NumberBox, Pill, ProgressRing,
|
|
16
|
-
SettingGroup, SettingRow, StatusDot, Switch, TabStrip, Theme, Toast, icon, load_icon,
|
|
16
|
+
SettingGroup, SettingRow, StatusDot, Switch, TabStrip, Table, Theme, Toast, icon, load_icon,
|
|
17
17
|
set_toast_anchor, show_toast, theme)
|
|
18
18
|
from ok.ui.qt.kit.theme import contrast_ratio, readable_accent
|
|
19
19
|
from ok.ui.qt.kit.icons import tinted_icon
|
|
@@ -247,6 +247,89 @@ class TestIcons(KitTestCase):
|
|
|
247
247
|
|
|
248
248
|
|
|
249
249
|
class TestWidgets(KitTestCase):
|
|
250
|
+
def test_table_clips_selection_at_the_bottom_corners(self):
|
|
251
|
+
table = Table(20, 2)
|
|
252
|
+
table.resize(450, 200)
|
|
253
|
+
table.verticalHeader().hide()
|
|
254
|
+
table.horizontalHeader().setStretchLastSection(True)
|
|
255
|
+
self.host(table)
|
|
256
|
+
table.scrollToBottom()
|
|
257
|
+
viewport = table.viewport()
|
|
258
|
+
QApplication.sendEvent(viewport, QEvent(QEvent.Type.Leave))
|
|
259
|
+
bounds = viewport.geometry()
|
|
260
|
+
|
|
261
|
+
def sample_colors():
|
|
262
|
+
image = table.grab().toImage()
|
|
263
|
+
scale = image.devicePixelRatio()
|
|
264
|
+
points = (bounds.bottomLeft(), bounds.bottomRight(), bounds.bottomRight() - QPoint(40, 3))
|
|
265
|
+
return [image.pixelColor(round(point.x() * scale), round(point.y() * scale)) for point in points]
|
|
266
|
+
|
|
267
|
+
idle = sample_colors()
|
|
268
|
+
table.selectRow(table.rowCount() - 1)
|
|
269
|
+
selected = sample_colors()
|
|
270
|
+
|
|
271
|
+
self.assertEqual(idle[:2], selected[:2])
|
|
272
|
+
self.assertNotEqual(idle[2], selected[2])
|
|
273
|
+
|
|
274
|
+
def test_table_draws_only_inner_dividers(self):
|
|
275
|
+
table = Table(3, 2)
|
|
276
|
+
table.resize(450, 200)
|
|
277
|
+
table.verticalHeader().hide()
|
|
278
|
+
self.host(table)
|
|
279
|
+
QApplication.sendEvent(table.viewport(), QEvent(QEvent.Type.Leave))
|
|
280
|
+
image = table.grab().toImage()
|
|
281
|
+
scale = image.devicePixelRatio()
|
|
282
|
+
|
|
283
|
+
def pixel(x, y):
|
|
284
|
+
return image.pixelColor(round(x * scale), round(y * scale))
|
|
285
|
+
|
|
286
|
+
body = table.viewport().geometry()
|
|
287
|
+
row_y = body.top() + table.rowViewportPosition(1) + table.rowHeight(1) // 2
|
|
288
|
+
first_edge = body.left() + table.columnViewportPosition(0) + table.columnWidth(0) - 1
|
|
289
|
+
last_edge = body.left() + table.columnViewportPosition(1) + table.columnWidth(1) - 1
|
|
290
|
+
self.assertNotEqual(pixel(first_edge + 4, row_y), pixel(first_edge, row_y))
|
|
291
|
+
self.assertEqual(pixel(last_edge + 4, row_y), pixel(last_edge, row_y))
|
|
292
|
+
|
|
293
|
+
header = table.horizontalHeader().geometry()
|
|
294
|
+
header_y = header.top() + header.height() // 2
|
|
295
|
+
header_edge = header.left() + table.columnWidth(0) - 1
|
|
296
|
+
self.assertEqual(pixel(header_edge + 4, header_y), pixel(header_edge, header_y))
|
|
297
|
+
|
|
298
|
+
def test_table_overlay_scrollbar_follows_the_view(self):
|
|
299
|
+
table = Table(50, 2)
|
|
300
|
+
table.resize(450, 200)
|
|
301
|
+
table.horizontalHeader().setStretchLastSection(True)
|
|
302
|
+
self.host(table)
|
|
303
|
+
scroll = table.verticalScrollBar()
|
|
304
|
+
overlay = table._scrollbar_overlay
|
|
305
|
+
|
|
306
|
+
self.assertTrue(overlay.isVisible())
|
|
307
|
+
self.assertEqual((scroll.minimum(), scroll.maximum()), (overlay.minimum(), overlay.maximum()))
|
|
308
|
+
overlay.setValue(overlay.maximum() // 2)
|
|
309
|
+
self.assertEqual(overlay.value(), scroll.value())
|
|
310
|
+
scroll.setValue(0)
|
|
311
|
+
self.assertEqual(0, overlay.value())
|
|
312
|
+
last = table.visualRect(table.model().index(0, 1))
|
|
313
|
+
self.assertEqual(overlay.width(), table._overlay_inset(last))
|
|
314
|
+
|
|
315
|
+
table.setRowCount(1)
|
|
316
|
+
QApplication.processEvents()
|
|
317
|
+
self.assertFalse(overlay.isVisible())
|
|
318
|
+
self.assertEqual(0, table._overlay_inset(last))
|
|
319
|
+
|
|
320
|
+
def test_table_tracks_the_hovered_row(self):
|
|
321
|
+
table = Table(5, 2)
|
|
322
|
+
table.resize(450, 300)
|
|
323
|
+
self.host(table)
|
|
324
|
+
viewport = table.viewport()
|
|
325
|
+
y = table.rowViewportPosition(2) + table.rowHeight(2) // 2
|
|
326
|
+
QApplication.sendEvent(viewport, QMouseEvent(
|
|
327
|
+
QEvent.Type.MouseMove, QPointF(20, y), viewport.mapToGlobal(QPointF(20, y)),
|
|
328
|
+
Qt.MouseButton.NoButton, Qt.MouseButton.NoButton, Qt.KeyboardModifier.NoModifier))
|
|
329
|
+
self.assertEqual(2, table._hovered_row)
|
|
330
|
+
QApplication.sendEvent(viewport, QEvent(QEvent.Type.Leave))
|
|
331
|
+
self.assertEqual(-1, table._hovered_row)
|
|
332
|
+
|
|
250
333
|
def test_kit_class_names_are_visible_to_stylesheets(self):
|
|
251
334
|
self.assertEqual("Button", Button("x").metaObject().className())
|
|
252
335
|
self.assertEqual("SettingRow", SettingRow("x").metaObject().className())
|
|
@@ -12,7 +12,7 @@ from qt_helpers import mouse_click, wait
|
|
|
12
12
|
from PySide6.QtWidgets import QApplication, QCheckBox, QScrollArea
|
|
13
13
|
|
|
14
14
|
from ok import og
|
|
15
|
-
from ok.ui.qt.kit import Dialog
|
|
15
|
+
from ok.ui.qt.kit import Dialog, Table
|
|
16
16
|
from ok.ui.qt.tasks import tasks_page as page_module
|
|
17
17
|
from ok.ui.qt.tasks.config_editors import (DropDownEditor, ListEditor, LineEditEditor, MultiSelectionEditor,
|
|
18
18
|
NumberEditor, SwitchEditor, TextEditEditor, config_editor)
|
|
@@ -440,6 +440,7 @@ class TestTasksPage(QtTestCase):
|
|
|
440
440
|
page.detail.refresh()
|
|
441
441
|
self.assertTrue(page.detail.tabs.item("info").isVisibleTo(page.detail))
|
|
442
442
|
page.detail.tabs.set_current("info")
|
|
443
|
+
self.assertIsInstance(page.detail.info_table, Table)
|
|
443
444
|
self.assertEqual("3", page.detail.info_table.item(0, 1).text())
|
|
444
445
|
|
|
445
446
|
def test_filter_tabs_follow_kinds_and_groups(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ok_script-3.0.6 → ok_script-3.0.7}/.agents/skills/setup-env/assets/ok-script-develop/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|