mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
1beb2abdc0
commit
a7322abc6a
@ -16,6 +16,7 @@ from gui.usefulwidget import (
|
|||||||
getboxlayout,
|
getboxlayout,
|
||||||
makesubtab_lazy,
|
makesubtab_lazy,
|
||||||
makescrollgrid,
|
makescrollgrid,
|
||||||
|
getsmalllabel,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -30,24 +31,41 @@ def changeHorizontal(self):
|
|||||||
gobject.baseobject.translation_ui.set_color_transparency()
|
gobject.baseobject.translation_ui.set_color_transparency()
|
||||||
|
|
||||||
|
|
||||||
|
def __exswitch(self, ex):
|
||||||
|
self.horizontal_slider.setMinimum(1 - ex)
|
||||||
|
gobject.baseobject.translation_ui.set_color_transparency()
|
||||||
|
|
||||||
|
|
||||||
def createhorizontal_slider(self):
|
def createhorizontal_slider(self):
|
||||||
|
|
||||||
self.horizontal_slider = QSlider()
|
self.horizontal_slider = QSlider()
|
||||||
self.horizontal_slider.setMaximum(100)
|
self.horizontal_slider.setMaximum(100)
|
||||||
self.horizontal_slider.setMinimum(0)
|
self.horizontal_slider.setMinimum(1 - globalconfig["transparent_EX"])
|
||||||
self.horizontal_slider.setOrientation(Qt.Orientation.Horizontal)
|
self.horizontal_slider.setOrientation(Qt.Orientation.Horizontal)
|
||||||
self.horizontal_slider.setValue(0)
|
|
||||||
self.horizontal_slider.setValue(globalconfig["transparent"])
|
self.horizontal_slider.setValue(globalconfig["transparent"])
|
||||||
self.horizontal_slider.valueChanged.connect(
|
self.horizontal_slider.valueChanged.connect(
|
||||||
functools.partial(changeHorizontal, self)
|
functools.partial(changeHorizontal, self)
|
||||||
)
|
)
|
||||||
return self.horizontal_slider
|
w = QWidget()
|
||||||
|
hb = QHBoxLayout()
|
||||||
|
hb.setContentsMargins(0, 0, 0, 0)
|
||||||
|
w.setLayout(hb)
|
||||||
|
|
||||||
|
|
||||||
def createhorizontal_slider_label(self):
|
|
||||||
self.horizontal_slider_label = QLabel()
|
self.horizontal_slider_label = QLabel()
|
||||||
self.horizontal_slider_label.setText("{}%".format(globalconfig["transparent"]))
|
self.horizontal_slider_label.setText("{}%".format(globalconfig["transparent"]))
|
||||||
return self.horizontal_slider_label
|
hb.addWidget(self.horizontal_slider)
|
||||||
|
hb.addWidget(self.horizontal_slider_label)
|
||||||
|
|
||||||
|
l = getsmalllabel(" EX")()
|
||||||
|
hb.addWidget(l)
|
||||||
|
sw = getsimpleswitch(
|
||||||
|
globalconfig,
|
||||||
|
"transparent_EX",
|
||||||
|
callback=functools.partial(__exswitch, self),
|
||||||
|
)
|
||||||
|
|
||||||
|
hb.addWidget(sw)
|
||||||
|
return w
|
||||||
|
|
||||||
|
|
||||||
def changeHorizontal_tool(self):
|
def changeHorizontal_tool(self):
|
||||||
@ -271,7 +289,6 @@ def mainuisetting(self):
|
|||||||
functools.partial(createhorizontal_slider, self),
|
functools.partial(createhorizontal_slider, self),
|
||||||
0,
|
0,
|
||||||
),
|
),
|
||||||
functools.partial(createhorizontal_slider_label, self),
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"背景颜色",
|
"背景颜色",
|
||||||
|
@ -1066,8 +1066,11 @@ class TranslatorWindow(resizableframeless):
|
|||||||
topr,
|
topr,
|
||||||
str2rgba(
|
str2rgba(
|
||||||
globalconfig["backcolor"],
|
globalconfig["backcolor"],
|
||||||
max(100 / 255, globalconfig["transparent"])
|
max(
|
||||||
* (not globalconfig["backtransparent"]),
|
(1 - globalconfig["transparent_EX"]) * 100 / 255,
|
||||||
|
globalconfig["transparent"]
|
||||||
|
* (not globalconfig["backtransparent"]),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -455,6 +455,7 @@
|
|||||||
"rawtextcolor": "#000000",
|
"rawtextcolor": "#000000",
|
||||||
"backcolor": "#000000",
|
"backcolor": "#000000",
|
||||||
"transparent": 27,
|
"transparent": 27,
|
||||||
|
"transparent_EX": false,
|
||||||
"backcolor_tool": "#000000",
|
"backcolor_tool": "#000000",
|
||||||
"transparent_tool": 27,
|
"transparent_tool": 27,
|
||||||
"isshowhira": true,
|
"isshowhira": true,
|
||||||
@ -621,7 +622,7 @@
|
|||||||
},
|
},
|
||||||
"backtransbutton": {
|
"backtransbutton": {
|
||||||
"use": true,
|
"use": true,
|
||||||
"tip": "背景窗口透明_EX",
|
"tip": "背景窗口透明",
|
||||||
"icon": "fa.lightbulb-o",
|
"icon": "fa.lightbulb-o",
|
||||||
"align": 2
|
"align": 2
|
||||||
},
|
},
|
||||||
|
@ -44,9 +44,8 @@
|
|||||||
当把翻译窗口置于游戏窗口的文本框之上时,激活这个按钮可以直接点击游戏的文本框而不是点击到翻译窗口上。<br>
|
当把翻译窗口置于游戏窗口的文本框之上时,激活这个按钮可以直接点击游戏的文本框而不是点击到翻译窗口上。<br>
|
||||||
当把鼠标移动到**鼠标穿透窗口按钮及其左右一个按钮的区域**时,会自动退出穿透以使用工具按钮;移出区域时自动恢复穿透。
|
当把鼠标移动到**鼠标穿透窗口按钮及其左右一个按钮的区域**时,会自动退出穿透以使用工具按钮;移出区域时自动恢复穿透。
|
||||||
|
|
||||||
1. #### <i class="fa fa-lightbulb"></i> <i class="btnstatus2 fa fa-lightbulb"></i> 背景窗口透明_EX
|
1. #### <i class="fa fa-lightbulb"></i> <i class="btnstatus2 fa fa-lightbulb"></i> 背景窗口透明
|
||||||
将不透明度降低到0后,将无法在拖动主窗口中的全透明区域。因此,使用设置中的透明度设置最低只允许将不透明度降低到0.39%,以防止误操作导致找不到窗口。
|
该按钮作用仅是一键使得翻译窗口的不透明度切换到0。这个切换不会使得原版的不透明度设置被遗忘。
|
||||||
而该按钮可以无视该限制,使得翻译窗口的不透明度切换到0。这个切换不会使得不透明度设置的值被遗忘。
|
|
||||||
|
|
||||||
1. #### <i class="fa fa-lock"></i> <i class="btnstatus2 fa fa-unlock"></i> 锁定工具栏
|
1. #### <i class="fa fa-lock"></i> <i class="btnstatus2 fa fa-unlock"></i> 锁定工具栏
|
||||||
未锁定工具栏时,当鼠标移出时,工具栏会自动隐藏;激活后工具栏将始终显示。<br>
|
未锁定工具栏时,当鼠标移出时,工具栏会自动隐藏;激活后工具栏将始终显示。<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user