mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
fix
This commit is contained in:
parent
7657b13c5f
commit
c99880272a
@ -17,6 +17,7 @@ from gui.usefulwidget import (
|
||||
FocusDoubleSpin,
|
||||
LFocusCombo,
|
||||
getsimplecombobox,
|
||||
SplitLine,
|
||||
)
|
||||
from gui.dynalang import (
|
||||
LFormLayout,
|
||||
@ -335,6 +336,7 @@ class noundictconfigdialog2(LDialog):
|
||||
self.button.setFocus()
|
||||
self.apply()
|
||||
|
||||
|
||||
def autoinitdialog_items(dic):
|
||||
items = []
|
||||
for arg in dic["args"]:
|
||||
@ -505,9 +507,7 @@ class autoinitdialog(LDialog):
|
||||
lineW.setValue(dd[key])
|
||||
lineW.valueChanged.connect(functools.partial(dd.__setitem__, key))
|
||||
elif line["type"] == "split":
|
||||
lineW = QLabel()
|
||||
lineW.setStyleSheet("background-color: gray;")
|
||||
lineW.setFixedHeight(2)
|
||||
lineW = SplitLine()
|
||||
formLayout.addRow(lineW)
|
||||
continue
|
||||
refswitch = line.get("refswitch", None)
|
||||
|
@ -25,6 +25,7 @@ from gui.usefulwidget import (
|
||||
LFocusCombo,
|
||||
FocusDoubleSpin,
|
||||
FocusSpin,
|
||||
SplitLine,
|
||||
)
|
||||
from gui.dynalang import LPushButton, LFormLayout
|
||||
|
||||
@ -247,18 +248,24 @@ def resetgroudswitchcallback(self, group):
|
||||
goodfontgroupswitch = LFocusCombo()
|
||||
self.seletengeinecombo.lastindex = self.seletengeinecombo.currentIndex()
|
||||
if group == "webview" or group == "QWebEngine":
|
||||
_btn = LPushButton("额外的html")
|
||||
_btn = LPushButton("编辑")
|
||||
_btn.clicked.connect(lambda: extrahtml(self))
|
||||
switch = getsimpleswitch(
|
||||
globalconfig,
|
||||
"useextrahtml",
|
||||
callback=lambda x: [
|
||||
gobject.baseobject.translation_ui.translate_text.textbrowser.loadextra(0),
|
||||
gobject.baseobject.translation_ui.translate_text.textbrowser.loadextra(
|
||||
0
|
||||
),
|
||||
_btn.setEnabled(x),
|
||||
],
|
||||
)
|
||||
_btn.setEnabled(globalconfig["useextrahtml"])
|
||||
self.goodfontsettingsformlayout.addRow(getboxlayout([_btn, switch]))
|
||||
self.goodfontsettingsformlayout.addRow(
|
||||
"额外的html",
|
||||
getboxlayout([switch, _btn]),
|
||||
)
|
||||
self.goodfontsettingsformlayout.addRow(SplitLine())
|
||||
if group == "QWebEngine":
|
||||
group = "webview"
|
||||
__form = LFormLayout()
|
||||
|
@ -2015,3 +2015,10 @@ class LIconLabel(LLabel):
|
||||
QIcon.Mode.Normal,
|
||||
QIcon.State.On,
|
||||
)
|
||||
|
||||
|
||||
class SplitLine(QFrame):
|
||||
def __init__(self, *argc):
|
||||
super().__init__(*argc)
|
||||
self.setStyleSheet("background-color: gray;")
|
||||
self.setFixedHeight(2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user