From 2818aee0612ee3efe160aa39a82b7836dcc8634d Mon Sep 17 00:00:00 2001 From: k-dominik Date: Wed, 21 Aug 2024 12:10:05 +0200 Subject: [PATCH] Fix dispay of AxisOrderWidget in dark mode plus some black autoformatting for long lines --- volumina/widgets/dataExportOptionsDlg.py | 38 +++++++++++++++++++----- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/volumina/widgets/dataExportOptionsDlg.py b/volumina/widgets/dataExportOptionsDlg.py index 446594d5..2b172d68 100644 --- a/volumina/widgets/dataExportOptionsDlg.py +++ b/volumina/widgets/dataExportOptionsDlg.py @@ -231,12 +231,36 @@ def _handleConvertDtypeChecked(): self.convertDtypeCheckbox.toggled.connect(_handleConvertDtypeChecked) dtypes = [ - ("integer 8-bit", "uint8", "Stores data as integers. More bits per value increase precision but require more storage and processing time."), - ("integer 16-bit", "uint16", "Stores data as integers. More bits per value increase precision but require more storage and processing time."), - ("integer 32-bit", "uint32", "Stores data as integers. More bits per value increase precision but require more storage and processing time."), - ("integer 64-bit", "uint64", "Stores data as integers. More bits per value increase precision but require more storage and processing time."), - ("floating-point 32-bit", "float32", "Stores data as numbers with a decimal point. More bits per value increase precision but require more storage and processing time."), - ("floating-point 64-bit", "float64", "Stores data as numbers with a decimal point. More bits per value increase precision but require more storage and processing time."), + ( + "integer 8-bit", + "uint8", + "Stores data as integers. More bits per value increase precision but require more storage and processing time.", + ), + ( + "integer 16-bit", + "uint16", + "Stores data as integers. More bits per value increase precision but require more storage and processing time.", + ), + ( + "integer 32-bit", + "uint32", + "Stores data as integers. More bits per value increase precision but require more storage and processing time.", + ), + ( + "integer 64-bit", + "uint64", + "Stores data as integers. More bits per value increase precision but require more storage and processing time.", + ), + ( + "floating-point 32-bit", + "float32", + "Stores data as numbers with a decimal point. More bits per value increase precision but require more storage and processing time.", + ), + ( + "floating-point 64-bit", + "float64", + "Stores data as numbers with a decimal point. More bits per value increase precision but require more storage and processing time.", + ), ] for i, (name, dtype, tooltip) in enumerate(dtypes): @@ -394,7 +418,7 @@ def _updateAxisOrderColor(self, allow_intermediate): if invalidAxes: self.outputAxisOrderEdit.setStyleSheet("QLineEdit {background-color: red}") else: - self.outputAxisOrderEdit.setStyleSheet("QLineEdit {background-color: white}") + self.outputAxisOrderEdit.setStyleSheet("QLineEdit {background-color: palette(base)}") class _AxisOrderEventFilter(QObject): def __init__(self, parent):