Skip to content

Commit

Permalink
Merge pull request #300 from Klosw/master
Browse files Browse the repository at this point in the history
启用高 DPI 缩放
  • Loading branch information
Monomux authored Aug 31, 2024
2 parents 4e7fa5f + 8feb950 commit deab5ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
pip3 install pyinstaller
- name: Bundle Packages
run: |
pyinstaller -Fw --add-data './assets;assets' KeymouseGo.py
pyinstaller -Fw --icon=Mondrian.ico --add-data './assets;assets' KeymouseGo.py
- name: Copy artifact
run: |
mkdir artifact && mv dist/KeymouseGo.exe ./artifact/KeymouseGo${{ env.keymousego-version }}-win.exe
Expand Down
3 changes: 2 additions & 1 deletion KeymouseGo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import sys
import math
from PySide6.QtWidgets import QApplication, QWidget, QSpinBox
from PySide6.QtCore import Slot, QRect
from PySide6.QtCore import Qt, Slot, QRect

import UIFunc
import argparse
Expand Down Expand Up @@ -42,6 +42,7 @@ def resize_layout(ui, ratio_w, ratio_h):
def main():

app = QApplication(sys.argv)
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
ui = UIFunc.UIFunc(app)

ui.setFixedSize(ui.width(), ui.height())
Expand Down
Binary file added Mondrian.ico
Binary file not shown.

0 comments on commit deab5ba

Please sign in to comment.