Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ body:
- 💠其他扩展
- ♻️清理缓存
- 🏳️‍🌈主题/样式
- 📄文档
- 📄文档站
- 🟦clickClean
- ❓其他/未知
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ body:
- ⤴️安装更新
- 💠其他扩展
- ♻️清理缓存
- 📄文档
- 📄文档站
- 🏳️‍🌈主题/样式
- 🟦clickClean
- ❓其他/未知
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ body:
- ⤴️安装更新
- 💠其他扩展
- ♻️清理缓存
- 📄文档
- 📄文档站
- 🏳️‍🌈主题/样式
- 🟦clickClean
- ❓其他/未知
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy to GitHub Pages

# 1. 定义触发工作流的事件:当推送到分支时触发,手动触发
on:
push:
branches:
- main # 推送到 main 分支时触发
- release_preview # 推送到 release_preview 分支时触发
- develop # 推送到 develop 分支时触发
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-deploy:
# 任务运行的环境:最新版本的 Ubuntu 虚拟机
runs-on: ubuntu-latest

# 3. 任务的具体步骤
steps:
# 步骤1: 签出你的仓库代码到虚拟机
- name: Checkout 🛎️
uses: actions/checkout@v3

# 设置 Node.js 环境
- name: Setup Node.js 🔧
uses: actions/setup-node@v3
with:
node-version: '24'
cache: 'npm' # 启用 npm 缓存以加速后续安装

# 安装项目依赖
- name: Install Dependencies 📦
run: npm ci

# 构建项目(生成静态文件到 dist/ 或 build/ 目录)
- name: Build Project 🏗️
run: npm run build

# 部署到 GitHub Pages 分支
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: documents/.vitepress/dist
143 changes: 143 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,146 @@ cython_debug/

# PyPI configuration file
.pypirc

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.*
!.env.example

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Sveltekit cache directory
.svelte-kit/

# vitepress build output
**/.vitepress/dist

# vitepress cache directory
**/.vitepress/cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# Firebase cache directory
.firebase/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

cache/
source/
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"markdown-preview-enhanced.previewTheme": "atom-dark.css",
"files.associations": {
"*.qss": "css",
"*.gui": "json"
"*.gui": "xml"
},
"gitLineAuthor.colorConfigs": [
{
Expand Down
31 changes: 11 additions & 20 deletions Gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
from check_update import check_update, web_data, download_file # 更新检查
from uiStyles import (UnitInputLayout, styles, maps, StyleReplaceMode, ULabel, CustonMessageButton, SelectUI, UCheckBox, UMessageBox, MessageButtonTemplate) # 软件界面样式
from uiStyles import indexes as style_indexes # 界面组件样式索引
from sharelibs import (run_software, langs, create_shortcut, __version__, is_pre, get_icon, default_button_text,
get_unit_value, unit_lang, get_size_text, get_file_hash, system_lang, settings, QtThread,
default_settings, mem_id, get_resource_path, run_as_admin, get_lang, set_style, compile_ui, UIWindow) # 共享库
from sharelibs import * # 共享库
from sharelibs import __version__ # 版本号
import parse_dev # 解析开发固件配置
import winreg # 注册表库
import math # 数学库
Expand Down Expand Up @@ -965,7 +964,7 @@ def apply_titleBar(self, window: QMainWindow | QDialog):

hwnd = window.winId().__int__()

if select_styles.css_data['.meta']['mode'] == 'dark':
if select_styles.css_data['.meta']['--mode'] == 'dark':
is_dark_mode = 1
else:
is_dark_mode = 0
Expand Down Expand Up @@ -995,7 +994,7 @@ def apply_global_theme(self):
steps = [
[['.selected:pressed', 'background-color'], lighten_color_hex(self.windows_color, -0.165)]
]
if select_styles.css_data['.meta']['mode'] == 'dark':
if select_styles.css_data['.meta']['--mode'] == 'dark':
steps.extend([
[['.selected', 'background-color'], lighten_color_hex(self.windows_color, 0.4)],
[['.selected:hover', 'background-color'], lighten_color_hex(self.windows_color, 0.45)],
Expand Down Expand Up @@ -2226,19 +2225,9 @@ def init_ui_old(self):
logger.debug('Initizalizing fast set click window successful.')

def init_ui(self):
self.ui = UIWindow(compile_ui(get_resource_path('ui', 'fastClick.gui')))

self.ui.find_widget('central_layout.unit_layout.delay_combo').addItems([get_lang('ms', source=unit_lang), get_lang('s', source=unit_lang)])
self.ui.find_widget('central_layout.unit_layout.times_combo').addItems([get_lang('66'), get_lang('2a'), get_lang('2b')])
self.ui.find_widget('central_layout.total_time_label').setText(main_window.total_time_label.text())
self.ui.find_widget('central_layout.total_time_label').setAlignment(Qt.AlignHCenter)

self.setLayout(self.ui.draw({
'central_layout.unit_layout.input_delay': {'textChanged': lambda: self.sync_input(QLineEdit.text, QLineEdit.setText, self.ui.find_widget('central_layout.unit_layout.input_delay'), main_window.input_delay)},
'central_layout.unit_layout.input_times': {'textChanged': lambda: self.sync_input(QLineEdit.text, QLineEdit.setText, self.ui.find_widget('central_layout.unit_layout.input_times'), main_window.input_times)},
'central_layout.unit_layout.delay_combo': {'currentIndexChanged': lambda: self.sync_input(QComboBox.currentIndex, QComboBox.setCurrentIndex, self.ui.find_widget('central_layout.unit_layout.delay_combo'), main_window.delay_combo)},
'central_layout.unit_layout.times_combo': {'currentIndexChanged': lambda: self.sync_input(QComboBox.currentIndex, QComboBox.setCurrentIndex, self.ui.find_widget('central_layout.unit_layout.times_combo'), main_window.times_combo)},
}))
self.ui = UIWindow(uiml.compile_ui_file(get_resource_path('ui', 'fastClick.gui')))

self.setLayout(self.ui.show())

# 主窗口同步 主窗口独立文件没有完成
main_window.input_delay.textChanged.connect(lambda: self.sync_input(QLineEdit.text, QLineEdit.setText, main_window.input_delay, self.ui.find_widget('central_layout.unit_layout.input_delay')))
Expand Down Expand Up @@ -2268,9 +2257,9 @@ def __init__(self):
self.init_ui_old()

def init_ui(self):
self.layout_list = UIWindow(compile_ui(get_resource_path('ui', 'clickattr.gui')))
self.layout_list = UIWindow(uiml.compile_ui_file(get_resource_path('ui', 'clickattr.gui')))

self.setLayout(self.layout_list.draw({"central_layout.bottom_layout.ok_button": {"clicked": self.close}}))
self.setLayout(self.layout_list.show())

logger.debug('Initizalizing click attribute window successful.')

Expand Down Expand Up @@ -2967,6 +2956,8 @@ def parse_hotkey(input: UHotkeyLineEdit):
checkbox = UCheckBox(i['name'])
if i['key'] == 'new_settings':
checkbox.checkStateChanged.connect(lambda chk,idx=i['key']:(self.save_dev_config(chk, idx),self.window_restarted.emit(),))
else:
checkbox.checkStateChanged.connect(lambda chk,idx=i['key']:(self.save_dev_config(chk, idx)))
checkbox.setChecked(dev_flags.get(i['key'], False))
desc = QLabel(i['desc'])
set_style(desc, StyleClass.d_11)
Expand Down
2 changes: 1 addition & 1 deletion Gui/res/defaultsetting.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"select_lang": "!var system_lang", "show_tray_icon": true, "soft_delay": 100, "click_delay": "", "click_times": "", "delay_unit": 0, "times_unit": 0, "failed_use_default": false, "times_failed_use_default": false, "update_enabled": true, "update_notify": true, "quiet_update": false, "update_ok_notify": true, "update_frequency": 1, "select_style": 0, "use_windows_color": true, "theme": "!var default_theme", "left_click_hotkey": ["F2"], "right_click_hotkey": ["F3"], "pause_click_hotkey": ["F4"], "stop_click_hotkey": ["F6"], "click_attr_hotkey": ["Ctrl", "Alt", "A"], "fast_click_hotkey": ["Ctrl", "Alt", "F"], "main_window_hotkey": ["Ctrl", "Alt", "M"], "default_doc_link": "https://xystudiocode.github.io/clickmouse_docs/{lang}", "lang_doc": 0, "update_log_path": "updatelog", "hotkey_enabled": false, "show_warning": true, "show_package_warning": true, "feedback": "https://github.com/xystudiocode/pyClickMouse/issues/new/choose", "hide_flags": true}
{"select_lang": "!var system_lang", "show_tray_icon": true, "soft_delay": 100, "click_delay": "", "click_times": "", "delay_unit": 0, "times_unit": 0, "failed_use_default": false, "times_failed_use_default": false, "update_enabled": true, "update_notify": true, "quiet_update": false, "update_ok_notify": true, "update_frequency": 1, "select_style": 0, "use_windows_color": true, "theme": "!var default_theme", "left_click_hotkey": ["F2"], "right_click_hotkey": ["F3"], "pause_click_hotkey": ["F4"], "stop_click_hotkey": ["F6"], "click_attr_hotkey": ["Ctrl", "Alt", "A"], "fast_click_hotkey": ["Ctrl", "Alt", "F"], "main_window_hotkey": ["Ctrl", "Alt", "M"], "default_doc_link": "https://xystudiocode.github.io/pyClickMouse/{lang}", "lang_doc": 0, "update_log_path": "updatelog", "hotkey_enabled": false, "show_warning": true, "show_package_warning": true, "feedback": "https://github.com/xystudiocode/pyClickMouse/issues/new/choose", "hide_flags": true}
2 changes: 1 addition & 1 deletion Gui/res/dev_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
{
"name": "Decoupling UI and program",
"key": "decoupling",
"desc": "To decouple the UI and program.This need to restart the program to take effect."
"desc": "To decouple the UI and program.This need to restart the program to\nake effect."
}
]
2 changes: 1 addition & 1 deletion Gui/res/styles/dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,5 @@ QStatusBar {

/* 元数据 */
.meta {
mode: dark;
--mode: dark;
}
2 changes: 1 addition & 1 deletion Gui/res/styles/light.qss
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,5 @@ QStatusBar {

/* 元数据 */
.meta {
mode: light;
--mode: light;
}
13 changes: 12 additions & 1 deletion Gui/res/ui/clickattr.gui
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
{"name": "central_layout", "value": {"direction": "v", "content": [{"name": "left_clicked", "value": {"type": "QLabel", "arg": ["!lang 0d"]}}, {"name": "right_clicked", "value": {"type": "QLabel", "arg": ["!lang 0e"]}}, {"name": "click_delay", "value": {"type": "QLabel", "arg": ["!lang 78"]}}, {"name": "click_times", "value": {"type": "QLabel", "arg": ["!lang 5c"]}}, {"name": "paused", "value": {"type": "QLabel", "arg": ["!lang 71"]}}, {"name": "stopped", "value": {"type": "QLabel", "arg": ["!lang 73"]}}, {"name": "total_run_time", "value": {"type": "QLabel", "arg": ["!lang 2c"]}}, {"name": "bottom_layout", "value": {"direction": "h", "stretch": true, "content": [{"name": "ok_button", "value": {"type": "QPushButton", "arg": ["!lang 1e"], "style": "selected"}}]}}]}}
<layout name="central_layout" direction="v">
<QLabel name="left_clicked" arg=["!lang 0d"] />
<QLabel name="right_clicked" arg=["!lang 0e"] />
<QLabel name="click_delay" arg=["!lang 78"] />
<QLabel name="click_times" arg=["!lang 5c"] />
<QLabel name="paused" arg=["!lang 71"] />
<QLabel name="stopped" arg=["!lang 73"] />
<QLabel name="total_run_time" arg=["!lang 2c"] />
<layout name="bottom_layout" direction="h" stretch="true">
<QPushButton name="ok_button" arg=["!lang 1e"] style="selected" signals={"clicked": self.close} />
</layout>
</layout>
15 changes: 14 additions & 1 deletion Gui/res/ui/fastClick.gui
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
{"name": "central_layout", "value": {"direction": "v", "content": [{"name": "unit_layout", "value": {"direction": "u", "texts": ["!lang 11", "!lang 5c"], "inputs": [{"name": "input_delay", "value": {"type": "QLineEdit", "init_steps": {"setFixedWidth": [300], "setFixedHeight": [30]}}}, {"name": "input_times", "value": {"type": "QLineEdit", "init_steps": {"setFixedWidth": [300], "setFixedHeight": [30]}}}], "combos": [{"name": "delay_combo", "value": {"type": "QComboBox", "init_steps": {"setFixedWidth": [60], "setFixedHeight": [30]}}}, {"name": "times_combo", "value": {"type": "QComboBox", "init_steps": {"setFixedWidth": [60], "setFixedHeight": [30]}}}]}}, {"name": "total_time_label", "value": {"type": "QLabel", "style": "big_text_16"}}]}}
<layout name="central_layout" direction="v">
<layout name="unit_layout" direction="u">
<texts values=['!lang 11', '!lang 5c'] />
<inputs>
<QLineEdit name="input_delay" init_steps=[{"name": "setFixedWidth", "args": [300]}, {"name": "setFixedHeight", "args": [30]}] signal={'textChanged': lambda: self.sync_input(QLineEdit.text, QLineEdit.setText, self.ui.find_widget('central_layout.unit_layout.input_delay'), main_window.input_delay)} />
<QLineEdit name="input_times" init_steps=[{"name": "setFixedWidth", "args": [300]}, {"name": "setFixedHeight", "args": [30]}] signal={'textChanged': lambda: self.sync_input(QLineEdit.text, QLineEdit.setText, self.ui.find_widget('central_layout.unit_layout.input_times'), main_window.input_times)} />
</inputs>
<combos>
<QComboBox name="delay_combo" init_steps=[{"name": "setFixedWidth", "args": [60]}, {"name": "setFixedHeight", "args": [30]}, {"name": "addItems", "args": [[get_lang('ms', source=unit_lang), get_lang('s', source=unit_lang)]]}] signal={'currentIndexChanged': lambda: self.sync_input(QComboBox.currentIndex, QComboBox.setCurrentIndex, self.ui.find_widget('central_layout.unit_layout.delay_combo'), main_window.delay_combo)} />
<QComboBox name="times_combo" init_steps=[{"name": "setFixedWidth", "args": [60]}, {"name": "setFixedHeight", "args": [30]}, {"name": "addItems", "args": [[get_lang('66'), get_lang('2a'), get_lang('2b')]]}] signal={'currentIndexChanged': lambda: self.sync_input(QComboBox.currentIndex, QComboBox.setCurrentIndex, self.ui.find_widget('central_layout.unit_layout.times_combo'), main_window.times_combo)} />
</combos>
</layout>
<QLabel name="total_time_label" style="big_text_16" init_steps=[{"name": "setText", "args": [main_window.total_time_label.text()]}, {"name": "setAlignment", "args": Qt.AlignHCenter}] />
</layout>
2 changes: 1 addition & 1 deletion Gui/res/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"clickmouse":"3.3.0.23alpha5"}
{"clickmouse":"3.3.0.23alpha6"}
Loading
Loading