mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
or
This commit is contained in:
parent
480dc6b049
commit
8b8f117e70
@ -1085,9 +1085,7 @@ class MAINUI:
|
|||||||
== Qt.WindowType.FramelessWindowHint
|
== Qt.WindowType.FramelessWindowHint
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
if isinstance(widget, QMenu):
|
if isinstance(widget, (QMenu, QFrame)):
|
||||||
return
|
|
||||||
if isinstance(widget, QFrame):
|
|
||||||
return
|
return
|
||||||
if (
|
if (
|
||||||
isinstance(widget, QWidget)
|
isinstance(widget, QWidget)
|
||||||
|
@ -37,7 +37,7 @@ class Textbrowser(QLabel):
|
|||||||
"错误",
|
"错误",
|
||||||
"can't find Webview2 runtime!",
|
"can't find Webview2 runtime!",
|
||||||
)
|
)
|
||||||
elif isinstance(e, ImportError) or isinstance(e, ModuleNotFoundError):
|
elif isinstance(e, (ImportError, ModuleNotFoundError)):
|
||||||
getQMessageBox(
|
getQMessageBox(
|
||||||
None,
|
None,
|
||||||
"错误",
|
"错误",
|
||||||
|
@ -1392,7 +1392,7 @@ def makeforms(lay: LFormLayout, lis, args):
|
|||||||
name, wid = None, line[0]
|
name, wid = None, line[0]
|
||||||
else:
|
else:
|
||||||
name, wid = line
|
name, wid = line
|
||||||
if isinstance(wid, tuple) or isinstance(wid, list):
|
if isinstance(wid, (tuple, list)):
|
||||||
hb = QHBoxLayout()
|
hb = QHBoxLayout()
|
||||||
hb.setContentsMargins(0, 0, 0, 0)
|
hb.setContentsMargins(0, 0, 0, 0)
|
||||||
if Stretch:
|
if Stretch:
|
||||||
|
@ -220,7 +220,7 @@ for uid in savehook_new_data:
|
|||||||
for k in _dfsavehook:
|
for k in _dfsavehook:
|
||||||
if k not in savehook_new_data[uid]:
|
if k not in savehook_new_data[uid]:
|
||||||
__v = _dfsavehook[k]
|
__v = _dfsavehook[k]
|
||||||
if isinstance(_dfsavehook[k], list) or isinstance(_dfsavehook[k], dict):
|
if isinstance(_dfsavehook[k], (list, dict)):
|
||||||
__v = __v.copy()
|
__v = __v.copy()
|
||||||
savehook_new_data[uid][k] = __v
|
savehook_new_data[uid][k] = __v
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ class Requester_common:
|
|||||||
disposition = b'Content-Disposition: form-data; name="'
|
disposition = b'Content-Disposition: form-data; name="'
|
||||||
disposition += name.encode("utf8")
|
disposition += name.encode("utf8")
|
||||||
disposition += b'"'
|
disposition += b'"'
|
||||||
if isinstance(data, tuple) or isinstance(data, list):
|
if isinstance(data, (tuple, list)):
|
||||||
if len(data) == 3:
|
if len(data) == 3:
|
||||||
filename, data, type_ = data
|
filename, data, type_ = data
|
||||||
elif len(data) == 2:
|
elif len(data) == 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user