Make setColumnMinimumWidth only work on Windows

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2025-06-03 17:30:08 +08:00
parent 9b932e9aa4
commit 9e76916c3b
+6 -5
View File
@@ -98,11 +98,12 @@ class UpdateSubsInfoMBox(AppQMessageBox):
return text
def setColumnMinWidth(self):
self.findChild(QGridLayout).setColumnMinimumWidth(
2,
max((len(row) + 10) for row in self.text().split('\n'))
* self.fontMetrics().averageCharWidth(),
)
if PLATFORM == 'Windows':
self.findChild(QGridLayout).setColumnMinimumWidth(
2,
max((len(row) + 10) for row in self.text().split('\n'))
* self.fontMetrics().averageCharWidth(),
)
def retranslate(self):
self.setWindowTitle(_(self.windowTitle()))