Commit 74a6ece6 authored by dmMaze's avatar dmMaze
Browse files

set default qt api to pyqt6

parent 7193a5eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ dummy_scripts.py

tmp
TEST*
ballontranslator/data/logs

*.json
.vscode
+6 −0
Original line number Diff line number Diff line
# Changelogs

### 2023-02-23
[v1.3.30](https://github.com/dmMaze/BallonsTranslator/releases/tag/v1.3.30) 发布
1. 从PyQt5换到PyQt6以支持更好的嵌字预览, [避免PyQt5与nuitka的线程兼容性问题](https://github.com/Nuitka/Nuitka/issues/251)
2. 支持改变嵌字层透明度 (#88) 注意只是预览, 不会改变渲染结果, 嵌字透明度在右侧菜单效果里改
3. log文件写进data/logs

### 2023-01-27
[v1.3.26](https://github.com/dmMaze/BallonsTranslator/releases/tag/v1.3.26) 发布
1. 选中文本迷你菜单支持*聚合词典专业划词翻译*[沙拉查词](https://saladict.crimx.com): [安装说明](doc/saladict_chs.md)
+6 −0
Original line number Diff line number Diff line
# Changelogs

### 2023-02-23
[v1.3.30](https://github.com/dmMaze/BallonsTranslator/releases/tag/v1.3.30) released
1. Migrate to PyQt6 for better text rendering preview and [compatibility](https://github.com/Nuitka/Nuitka/issues/251) with nuitka
2. Support set transparency of lettering layer (#88)
3. Dump logs to data/logs

### 2023-01-27
[v1.3.26](https://github.com/dmMaze/BallonsTranslator/releases/tag/v1.3.26) released
1. Add support for [saladict](https://saladict.crimx.com) (*All-in-one professional pop-up dictionary and page translator*) in the mini menu on text selection. [Installation guide](doc/saladict.md) 
+8 −2
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@ import sys
import argparse
import os.path as osp
import os
from utils.logger import logger as LOGGER
# from utils.logger import logger as LOGGER
from utils.logger import setup_logging, logger as LOGGER

QT_APIS = ['pyqt5', 'pyqt6']

@@ -13,7 +14,7 @@ def main():
    args = parser.parse_args()

    if not args.qt_api in QT_APIS:
        os.environ['QT_API'] = 'pyqt5'
        os.environ['QT_API'] = 'pyqt6'
    else:
        os.environ['QT_API'] = args.qt_api

@@ -41,6 +42,9 @@ def main():
        QApplication.setHighDpiScaleFactorRoundingPolicy(Qt.HighDpiScaleFactorRoundingPolicy.PassThrough)

    os.chdir(C.PROGRAM_PATH)

    setup_logging(C.LOGGING_PATH)

    app = QApplication(sys.argv)
    translator = QTranslator()
    translator.load(
@@ -49,6 +53,8 @@ def main():
    )
    app.installTranslator(translator)

    print((QLocale.system().name()))

    C.LDPI = QGuiApplication.primaryScreen().logicalDotsPerInch()
    yahei = QFont('Microsoft YaHei UI')
    if yahei.exactMatch():
+80 B (13.4 KiB)

File changed.

No diff preview for this file type.

Loading