diff --git a/LunaTranslator/LunaTranslator/gui/rangeselect.py b/LunaTranslator/LunaTranslator/gui/rangeselect.py index 4fae90ad..a784c15d 100644 --- a/LunaTranslator/LunaTranslator/gui/rangeselect.py +++ b/LunaTranslator/LunaTranslator/gui/rangeselect.py @@ -241,110 +241,3 @@ def rangeselct_function(parent, callback, clickrelease, startauto): screen_shot_ui.startauto = startauto screen_shot_ui.clickrelease = clickrelease - - -from myutils.wrapper import Singleton_close - - -@Singleton_close -class moveresizegame(QDialog): - - def __init__(self, parent, hwnd): - super().__init__(parent) - self.setWindowFlags( - Qt.Dialog | Qt.WindowMaximizeButtonHint | Qt.WindowCloseButtonHint - ) - self.setWindowTitle("调整窗口 " + windows.GetWindowText(hwnd)) - # self.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint ) - # self.setAttribute(Qt.WA_TranslucentBackground) - self.setWindowOpacity(0.5) - - self.setMouseTracking(True) - - self._isTracking = False - - self.hwnd = hwnd - self.maxed = False - if self.hwnd == 0: - self.close() - try: - rect = windows.GetWindowRect(self.hwnd) - if rect: - self.setGeometry(rect[0], rect[1], rect[2] - rect[0], rect[3] - rect[1]) - self.show() - except: - self.close() - - def moveEvent(self, a0) -> None: - rect = self.geometry() - if self.isMaximized() == False: - try: - windows.MoveWindow( - self.hwnd, - rect.left(), - rect.top(), - rect.right() - rect.left(), - rect.bottom() - rect.top(), - False, - ) - except: - pass - return super().moveEvent(a0) - - def closeEvent(self, a0) -> None: - gobject.baseobject.moveresizegame = None - return super().closeEvent(a0) - - def mouseMoveEvent(self, e): - if self._isTracking: - self._endPos = e.pos() - self._startPos - self.move(self.pos() + self._endPos) - rect = self.geometry() - if self.isMaximized() == False: - try: - windows.MoveWindow( - self.hwnd, - rect.left(), - rect.top(), - rect.right() - rect.left(), - rect.bottom() - rect.top(), - False, - ) - except: - pass - - def mousePressEvent(self, e): - if e.button() == Qt.LeftButton: - self._isTracking = True - self._startPos = QPoint(e.x(), e.y()) - - def mouseReleaseEvent(self, e): - if e.button() == Qt.LeftButton: - self._isTracking = False - self._startPos = None - self._endPos = None - - def changeEvent(self, a0) -> None: - if a0.type() == QEvent.WindowStateChange: - try: - if self.isMaximized(): - windows.ShowWindow(self.hwnd, windows.SW_MAXIMIZE) - else: - windows.ShowWindow(self.hwnd, windows.SW_SHOWNORMAL) - except: - pass - - def resizeEvent(self, a0): - if self.isMaximized() == False: - rect = self.geometry() - try: - windows.MoveWindow( - self.hwnd, - rect.left(), - rect.top(), - rect.right() - rect.left(), - rect.bottom() - rect.top(), - False, - ) - except: - pass diff --git a/LunaTranslator/LunaTranslator/gui/translatorUI.py b/LunaTranslator/LunaTranslator/gui/translatorUI.py index 7aa422c8..2f772716 100644 --- a/LunaTranslator/LunaTranslator/gui/translatorUI.py +++ b/LunaTranslator/LunaTranslator/gui/translatorUI.py @@ -20,7 +20,7 @@ from myutils.hwnd import mouseselectwindow, grabwindow, getExeIcon from gui.dialog_savedgame import dialog_savedgame_new from gui.dialog_memory import dialog_memory from gui.textbrowser import Textbrowser -from gui.rangeselect import moveresizegame, rangeselct_function +from gui.rangeselect import rangeselct_function from gui.usefulwidget import resizableframeless, isinrect from gui.dialog_savedgame import browserdialog from winsharedutils import showintab @@ -415,14 +415,6 @@ class QUnFrameWindow(resizableframeless): ("selectocrrange", lambda: self.clickRange(False)), ("hideocrrange", self.showhideocrrange), ("bindwindow", self.bindcropwindow_signal.emit), - ( - "resize", - lambda: ( - moveresizegame(self, gobject.baseobject.textsource.hwnd) - if gobject.baseobject.textsource.hwnd - else 0 - ), - ), ("fullscreen", self._fullsgame), ("grabwindow", lambda: grabwindow(getimageformat())), ("muteprocess", self.muteprocessfuntion), diff --git a/LunaTranslator/files/defaultconfig/config.json b/LunaTranslator/files/defaultconfig/config.json index 6ddda8f5..c0b3ea24 100644 --- a/LunaTranslator/files/defaultconfig/config.json +++ b/LunaTranslator/files/defaultconfig/config.json @@ -263,7 +263,6 @@ "selectocrrange", "hideocrrange", "bindwindow", - "resize", "fullscreen", "grabwindow", "muteprocess", @@ -420,12 +419,6 @@ "icon": "fa.camera", "align": 0 }, - "resize": { - "use": false, - "tip": "调整游戏窗口", - "icon": "fa.arrows", - "align": 0 - }, "muteprocess": { "use": false, "tip": "游戏静音", diff --git a/LunaTranslator/files/lang/ar.json b/LunaTranslator/files/lang/ar.json index 7a0d4142..f521c4d2 100644 --- a/LunaTranslator/files/lang/ar.json +++ b/LunaTranslator/files/lang/ar.json @@ -197,7 +197,6 @@ "名詞": "اسم", "用户词典1(可选)": "قاموس المستخدم 1 ( اختياري )", "Magpie10路径": "مسار ماغبي 10", - "调整游戏窗口": "ضبط نافذة اللعبة", "显示游戏静音按钮": "عرض لعبة زر كتم الصوت", "刷新延迟(ms)": "تحديث تأخير ( ماجستير )", "选择": "مختار", diff --git a/LunaTranslator/files/lang/cht.json b/LunaTranslator/files/lang/cht.json index e3027fbf..c90e4ed5 100644 --- a/LunaTranslator/files/lang/cht.json +++ b/LunaTranslator/files/lang/cht.json @@ -447,7 +447,6 @@ "相关说明": "相關說明", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "如果你感覺該軟件對你有幫助,歡迎微信掃碼贊助,謝謝~", "绑定窗口(部分软件不支持)(点击自己取消)": "綁定視窗(部分軟件不支持)(點擊自己取消)", - "调整游戏窗口": "調整遊戲視窗", "绑定窗口按钮": "綁定視窗按鈕", "处理": "處理", "波兰语": "波蘭語", diff --git a/LunaTranslator/files/lang/en.json b/LunaTranslator/files/lang/en.json index 510f591d..6543ba2a 100644 --- a/LunaTranslator/files/lang/en.json +++ b/LunaTranslator/files/lang/en.json @@ -447,7 +447,6 @@ "相关说明": "Related instructions", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "If you feel that this software is helpful to you, you are welcome to scan WeChat for sponsorship. Thank you~", "绑定窗口(部分软件不支持)(点击自己取消)": "Binding window (not supported by some software) (click to cancel yourself)", - "调整游戏窗口": "Adjusting the game window", "绑定窗口按钮": "Bind Window Button", "处理": "handle", "波兰语": "Polish", diff --git a/LunaTranslator/files/lang/es.json b/LunaTranslator/files/lang/es.json index 7e56e333..d66bc2b8 100644 --- a/LunaTranslator/files/lang/es.json +++ b/LunaTranslator/files/lang/es.json @@ -447,7 +447,6 @@ "相关说明": "Instrucciones pertinentes", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Si sientes que el software te ayuda, Bienvenido al patrocinio de escaneo de wechat, Gracias.", "绑定窗口(部分软件不支持)(点击自己取消)": "Ventana vinculada (parte del software no admite) (haga clic para cancelar por sí mismo)", - "调整游戏窗口": "Ajustar la ventana del juego", "绑定窗口按钮": "Botón de ventana vinculada", "处理": "Tratamiento", "波兰语": "Polaco", diff --git a/LunaTranslator/files/lang/fr.json b/LunaTranslator/files/lang/fr.json index e4b0e72d..f136646c 100644 --- a/LunaTranslator/files/lang/fr.json +++ b/LunaTranslator/files/lang/fr.json @@ -447,7 +447,6 @@ "相关说明": "Instructions connexes", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Si vous sentez que le logiciel vous aide, bienvenue Wechat scan code sponsoring, merci ~", "绑定窗口(部分软件不支持)(点击自己取消)": "Binding window (non pris en charge par certains logiciels) (cliquez vous - même pour annuler)", - "调整游戏窗口": "Ajuster la fenêtre de jeu", "绑定窗口按钮": "Bouton BIND window", "处理": "Traitement", "波兰语": "Polonais", diff --git a/LunaTranslator/files/lang/it.json b/LunaTranslator/files/lang/it.json index e893ee78..8df9a6ad 100644 --- a/LunaTranslator/files/lang/it.json +++ b/LunaTranslator/files/lang/it.json @@ -435,7 +435,6 @@ "相关说明": "Istruzioni correlate", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Se ritieni che questo software sia utile per te, sei il benvenuto a scansionare WeChat per la sponsorizzazione.", "绑定窗口(部分软件不支持)(点击自己取消)": "Finestra di associazione (non supportata da alcuni software) (clicca per annullarti)", - "调整游戏窗口": "Regolazione della finestra di gioco", "处理": "maniglia", "波兰语": "Polacco", "窗口按钮设置": "Impostazioni pulsante finestra", diff --git a/LunaTranslator/files/lang/ja.json b/LunaTranslator/files/lang/ja.json index b6e5d18e..200848a9 100644 --- a/LunaTranslator/files/lang/ja.json +++ b/LunaTranslator/files/lang/ja.json @@ -447,7 +447,6 @@ "相关说明": "関連説明", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "もしあなたがこのソフトウェアがあなたに役立つと感じたら、微信スキャンコードの協賛を歓迎します、ありがとうございます~", "绑定窗口(部分软件不支持)(点击自己取消)": "バインドウィンドウ(一部のソフトウェアではサポートされていません)(自分でキャンセルするをクリック)", - "调整游戏窗口": "ゲームウィンドウを調整する", "绑定窗口按钮": "ウィンドウボタンのバインド", "处理": "しょり", "波兰语": "ポーランド語", diff --git a/LunaTranslator/files/lang/ko.json b/LunaTranslator/files/lang/ko.json index d9676ace..d4aae973 100644 --- a/LunaTranslator/files/lang/ko.json +++ b/LunaTranslator/files/lang/ko.json @@ -447,7 +447,6 @@ "相关说明": "관련 설명", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "만약 당신이 이 소프트웨어가 당신에게 도움이 된다고 느낀다면, 위챗 스캔 협찬을 환영합니다. 감사합니다~", "绑定窗口(部分软件不支持)(点击自己取消)": "바인딩 창 (일부 소프트웨어는 지원되지 않음) (자체 취소 클릭)", - "调整游戏窗口": "게임 창 조정", "绑定窗口按钮": "바인딩 창 단추", "处理": "처리", "波兰语": "폴란드어", diff --git a/LunaTranslator/files/lang/pl.json b/LunaTranslator/files/lang/pl.json index 8bcf010b..141b4776 100644 --- a/LunaTranslator/files/lang/pl.json +++ b/LunaTranslator/files/lang/pl.json @@ -447,7 +447,6 @@ "相关说明": "Powiązane instrukcje", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Jeśli uważasz, że to oprogramowanie jest dla Ciebie pomocne, zapraszamy do skanowania WeChat w celu uzyskania sponsorowania.", "绑定窗口(部分软件不支持)(点击自己取消)": "Okno wiążące (nie obsługiwane przez niektóre oprogramowanie) (kliknij, aby anulować)", - "调整游戏窗口": "Dostosowanie okna gry", "绑定窗口按钮": "Przycisk Wiąż okno", "处理": "uchwyt", "波兰语": "Polski", diff --git a/LunaTranslator/files/lang/ru.json b/LunaTranslator/files/lang/ru.json index 6a7730b0..e1bf5932 100644 --- a/LunaTranslator/files/lang/ru.json +++ b/LunaTranslator/files/lang/ru.json @@ -447,7 +447,6 @@ "相关说明": "Примечания", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Если вы чувствуете, что программное обеспечение помогает вам, добро пожаловать в спонсорскую поддержку WeChat подметания, спасибо", "绑定窗口(部分软件不支持)(点击自己取消)": "Связанное окно (часть программного обеспечения не поддерживается) (Нажмите сам, чтобы отменить)", - "调整游戏窗口": "Настройка окна игры", "绑定窗口按钮": "Кнопка окна", "处理": "Обработка", "波兰语": "Польский язык", diff --git a/LunaTranslator/files/lang/th.json b/LunaTranslator/files/lang/th.json index dc734d81..7c72ad40 100644 --- a/LunaTranslator/files/lang/th.json +++ b/LunaTranslator/files/lang/th.json @@ -72,7 +72,6 @@ "搜索": "ค้นหา", "游戏信息": "ข้อมูลเกม", "特殊码": "รหัสพิเศษ", - "调整游戏窗口": "ปรับหน้าต่างเกม", "端口冲突": "ความขัดแย้งของพอร์ต", "删除选中编码": "ลบการเข้ารหัสที่เลือก", "连接进程": "กระบวนการเชื่อมต่อ", diff --git a/LunaTranslator/files/lang/tr.json b/LunaTranslator/files/lang/tr.json index 3aee48a5..db1d5350 100644 --- a/LunaTranslator/files/lang/tr.json +++ b/LunaTranslator/files/lang/tr.json @@ -447,7 +447,6 @@ "相关说明": "İlişkili talimatlar", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Eğer bu yazılım size yardımcı olduğunu hissediyorsanız, sponsorluk için WeChat'ı taramak için hoş geldiniz. Teşekkürler ~", "绑定窗口(部分软件不支持)(点击自己取消)": "Bağlama penceresi (bazı yazılım tarafından desteklenmiyor) (kendini iptal etmek için tıklayın)", - "调整游戏窗口": "Oyun penceresini ayarlama", "绑定窗口按钮": "Bağlam Pencere Düğmesi", "处理": "Döndür", "波兰语": "Polonyca@ item Spelling dictionary", diff --git a/LunaTranslator/files/lang/uk.json b/LunaTranslator/files/lang/uk.json index 49d27d4c..aea00dc0 100644 --- a/LunaTranslator/files/lang/uk.json +++ b/LunaTranslator/files/lang/uk.json @@ -435,7 +435,6 @@ "相关说明": "Пов’ язані інструкції", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Якщо ви відчуваєте, що це програмне забезпечення допомагає вам, ви можете сканувати WeChat для спонсорування. Дякую ~", "绑定窗口(部分软件不支持)(点击自己取消)": "Вікно прив’ язання (не підтримується деяким програмним забезпеченням) (натисніть, щоб скасувати себе)", - "调整游戏窗口": "Налаштування вікна гри", "处理": "ручка", "波兰语": "ПольськаName", "窗口按钮设置": "Window button settings", diff --git a/LunaTranslator/files/lang/vi.json b/LunaTranslator/files/lang/vi.json index 0a607dcf..70161985 100644 --- a/LunaTranslator/files/lang/vi.json +++ b/LunaTranslator/files/lang/vi.json @@ -447,7 +447,6 @@ "相关说明": "Hướng dẫn liên quan", "如果你感觉该软件对你有帮助,欢迎微信扫码赞助,谢谢~": "Nếu bạn cảm thấy phần mềm này có ích cho bạn, hoan nghênh tài trợ quét mã wechat, cảm ơn~", "绑定窗口(部分软件不支持)(点击自己取消)": "Cửa sổ bị ràng buộc (một số phần mềm không hỗ trợ) (Nhấp vào tự hủy)", - "调整游戏窗口": "Điều chỉnh cửa sổ trò chơi", "绑定窗口按钮": "Nút cửa sổ liên kết", "处理": "Xử lý", "波兰语": "Ba Lan", diff --git a/LunaTranslator/files/lang/zh.json b/LunaTranslator/files/lang/zh.json index 51b575b3..9760e354 100644 --- a/LunaTranslator/files/lang/zh.json +++ b/LunaTranslator/files/lang/zh.json @@ -72,7 +72,6 @@ "搜索": "", "游戏信息": "", "特殊码": "", - "调整游戏窗口": "", "端口冲突": "", "删除选中编码": "", "连接进程": "",