mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
showfy
This commit is contained in:
parent
4b5a51f093
commit
2ab37d4a90
@ -38,6 +38,9 @@ def __changeuibuttonstate(self, x):
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def __changeuibuttonstate2(self, x):
|
||||||
|
gobject.baseobject.translation_ui.refreshtoolicon()
|
||||||
|
|
||||||
|
|
||||||
def createtextfontcom(key):
|
def createtextfontcom(key):
|
||||||
font_comboBox = FocusFontCombo()
|
font_comboBox = FocusFontCombo()
|
||||||
@ -361,7 +364,13 @@ def xianshigrid_text(self):
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
"显示翻译",
|
"显示翻译",
|
||||||
D_getsimpleswitch(globalconfig, "showfanyi"),
|
D_getsimpleswitch(
|
||||||
|
globalconfig,
|
||||||
|
"showfanyi",
|
||||||
|
callback=lambda x: __changeuibuttonstate2(self, x),
|
||||||
|
name="show_fany_switch",
|
||||||
|
parent=self,
|
||||||
|
),
|
||||||
"",
|
"",
|
||||||
("显示翻译器名称"),
|
("显示翻译器名称"),
|
||||||
D_getsimpleswitch(globalconfig, "showfanyisource"),
|
D_getsimpleswitch(globalconfig, "showfanyisource"),
|
||||||
|
@ -44,6 +44,7 @@ def registrhotkeys(self):
|
|||||||
"_3": self.showsignal.emit,
|
"_3": self.showsignal.emit,
|
||||||
"_4": lambda: winsharedutils.clipboard_set(gobject.baseobject.currenttext),
|
"_4": lambda: winsharedutils.clipboard_set(gobject.baseobject.currenttext),
|
||||||
"_5": gobject.baseobject.translation_ui.changeshowhideraw,
|
"_5": gobject.baseobject.translation_ui.changeshowhideraw,
|
||||||
|
"_51":gobject.baseobject.translation_ui.changeshowhidetrans,
|
||||||
"_6": lambda: gobject.baseobject.transhis.showsignal.emit(),
|
"_6": lambda: gobject.baseobject.transhis.showsignal.emit(),
|
||||||
"_7": lambda: gobject.baseobject.readcurrent(force=True),
|
"_7": lambda: gobject.baseobject.readcurrent(force=True),
|
||||||
"_8": lambda: gobject.baseobject.translation_ui.changemousetransparentstate(0),
|
"_8": lambda: gobject.baseobject.translation_ui.changemousetransparentstate(0),
|
||||||
|
@ -511,6 +511,12 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
lambda: globalconfig["isshowrawtext"],
|
lambda: globalconfig["isshowrawtext"],
|
||||||
lambda: globalconfig["isshowrawtext"],
|
lambda: globalconfig["isshowrawtext"],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"showtrans",
|
||||||
|
self.changeshowhidetrans,
|
||||||
|
lambda: globalconfig["showfanyi"],
|
||||||
|
lambda: globalconfig["showfanyi"],
|
||||||
|
),
|
||||||
("history", lambda: gobject.baseobject.transhis.showsignal.emit()),
|
("history", lambda: gobject.baseobject.transhis.showsignal.emit()),
|
||||||
(
|
(
|
||||||
"noundict",
|
"noundict",
|
||||||
@ -1064,6 +1070,13 @@ class QUnFrameWindow(resizableframeless):
|
|||||||
globalconfig["isshowrawtext"] = not globalconfig["isshowrawtext"]
|
globalconfig["isshowrawtext"] = not globalconfig["isshowrawtext"]
|
||||||
self.refreshtoolicon()
|
self.refreshtoolicon()
|
||||||
|
|
||||||
|
def changeshowhidetrans(self):
|
||||||
|
try:
|
||||||
|
gobject.baseobject.settin_ui.show_fany_switch.clicksignal.emit()
|
||||||
|
except:
|
||||||
|
globalconfig["showfanyi"] = not globalconfig["showfanyi"]
|
||||||
|
self.refreshtoolicon()
|
||||||
|
|
||||||
def changeTranslateMode(self):
|
def changeTranslateMode(self):
|
||||||
globalconfig["autorun"] = not globalconfig["autorun"]
|
globalconfig["autorun"] = not globalconfig["autorun"]
|
||||||
self.refreshtoolicon()
|
self.refreshtoolicon()
|
||||||
|
@ -756,6 +756,13 @@
|
|||||||
"icon2": "fa.eye-slash",
|
"icon2": "fa.eye-slash",
|
||||||
"align": 2
|
"align": 2
|
||||||
},
|
},
|
||||||
|
"showtrans": {
|
||||||
|
"use": false,
|
||||||
|
"tip": "显示/隐藏翻译",
|
||||||
|
"icon": "fa.eye",
|
||||||
|
"icon2": "fa.eye-slash",
|
||||||
|
"align": 2
|
||||||
|
},
|
||||||
"langdu": {
|
"langdu": {
|
||||||
"use": true,
|
"use": true,
|
||||||
"tip": "朗读",
|
"tip": "朗读",
|
||||||
@ -920,6 +927,11 @@
|
|||||||
"name": "显示/隐藏原文",
|
"name": "显示/隐藏原文",
|
||||||
"keystring": ""
|
"keystring": ""
|
||||||
},
|
},
|
||||||
|
"_51": {
|
||||||
|
"use": false,
|
||||||
|
"name": "显示/隐藏翻译",
|
||||||
|
"keystring": ""
|
||||||
|
},
|
||||||
"_6": {
|
"_6": {
|
||||||
"use": false,
|
"use": false,
|
||||||
"name": "显示/隐藏历史翻译",
|
"name": "显示/隐藏历史翻译",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user