Update XrayAssetViewerQListWidget.py

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2024-05-28 11:50:00 +08:00
parent d50c3c500d
commit df50f57843
+10 -1
View File
@@ -202,7 +202,16 @@ class XrayAssetViewerQListWidget(SupportThemeChangedCallback, AppQListWidget):
# Do not delete
pass
mbox = QuestionDeleteMBox(icon=AppQMessageBox.Icon.Question)
if PLATFORM == 'Windows':
# Windows
mbox = QuestionDeleteMBox(icon=AppQMessageBox.Icon.Question)
else:
# macOS & linux
mbox = QuestionDeleteMBox(
icon=AppQMessageBox.Icon.Question, parent=self.parent()
)
mbox.setWindowModality(QtCore.Qt.WindowModality.WindowModal)
mbox.isMulti = bool(len(indexes) > 1)
mbox.possibleRemark = f'{self.item(indexes[0]).text()}'
mbox.setText(mbox.customText())