forked from IPKM/nmreval
removed symbols from shift/scale, combobox in fitparameter respects sizehint
This commit is contained in:
parent
ccbdf72416
commit
5b0c5bb4bb
@ -46,7 +46,7 @@ class QShift(QtWidgets.QDialog, Ui_shift_dialog):
|
|||||||
pl = [PlotItem(x=x, y=y.real, name=name, pen=mkPen(color=color)),
|
pl = [PlotItem(x=x, y=y.real, name=name, pen=mkPen(color=color)),
|
||||||
PlotItem(x=x, y=y.imag, name=name, pen=mkPen(color=color))]
|
PlotItem(x=x, y=y.imag, name=name, pen=mkPen(color=color))]
|
||||||
else:
|
else:
|
||||||
pl = [PlotItem(x=x, y=y, name=name, symbol='t', pen=mkPen(color=color))]
|
pl = [PlotItem(x=x, y=y, name=name, pen=mkPen(color=color))]
|
||||||
|
|
||||||
self.data[idx] = (pl, x, y)
|
self.data[idx] = (pl, x, y)
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ class QFitDialog(QtWidgets.QWidget, Ui_FitDialog):
|
|||||||
if function is None:
|
if function is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
dialog = QFitParameterWidget()
|
dialog = QFitParameterWidget(self.stackedWidget)
|
||||||
data_names = self.data_table.data_list(include_name=True)
|
data_names = self.data_table.data_list(include_name=True)
|
||||||
|
|
||||||
dialog.set_function(function, function_idx)
|
dialog.set_function(function, function_idx)
|
||||||
|
@ -183,7 +183,12 @@ class QAsciiReader(QtWidgets.QDialog, Ui_ascii_reader):
|
|||||||
|
|
||||||
col_header = None
|
col_header = None
|
||||||
if self.column_checkBox.isChecked():
|
if self.column_checkBox.isChecked():
|
||||||
col_header = [self.ascii_table.horizontalHeaderItem(i).text() for i in range(self.ascii_table.columnCount())]
|
col_header = []
|
||||||
|
for i in range(self.ascii_table.columnCount()):
|
||||||
|
if self.ascii_table.horizontalHeaderItem(i) is not None:
|
||||||
|
col_header.append(self.ascii_table.horizontalHeaderItem(i).text())
|
||||||
|
else:
|
||||||
|
col_header.append(i)
|
||||||
|
|
||||||
if y is not None and col_header is not None:
|
if y is not None and col_header is not None:
|
||||||
col_header = [col_header[i] for i in range(len(col_header)) if i in y]
|
col_header = [col_header[i] for i in range(len(col_header)) if i in y]
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from . import HAS_IMPORTLIB_RESOURCE
|
from . import HAS_IMPORTLIB_RESOURCE
|
||||||
from ..Qt import QtGui, QtWidgets
|
from ..Qt import QtGui, QtWidgets, QtCore
|
||||||
|
|
||||||
|
|
||||||
class DarkPalette(QtGui.QPalette):
|
class DarkPalette(QtGui.QPalette):
|
||||||
@ -97,6 +97,14 @@ class MyProxyStyle(QtWidgets.QProxyStyle):
|
|||||||
from pkg_resources import resource_filename
|
from pkg_resources import resource_filename
|
||||||
with open(resource_filename('resources.icons', 'style.qss'), 'r') as f:
|
with open(resource_filename('resources.icons', 'style.qss'), 'r') as f:
|
||||||
obj.setStyleSheet(f.read())
|
obj.setStyleSheet(f.read())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return super().polish(obj)
|
return super().polish(obj)
|
||||||
|
|
||||||
|
def drawComplexControl(self, control: QtWidgets.QStyle.ComplexControl,
|
||||||
|
opts: QtWidgets.QStyleOptionComplex, painter: QtGui.QPainter, widget=None):
|
||||||
|
if control == QtWidgets.QStyle.CC_ComboBox:
|
||||||
|
textrect = self.baseStyle().subControlRect(QtWidgets.QStyle.CC_ComboBox, opts, QtWidgets.QStyle.SC_ComboBoxEditField, widget)
|
||||||
|
opts.currentText = painter.fontMetrics().elidedText(opts.currentText, QtCore.Qt.ElideRight, textrect.width())
|
||||||
|
super().drawComplexControl(control, opts, painter, widget=widget)
|
||||||
|
else:
|
||||||
|
super().drawComplexControl(control, opts, painter, widget=widget)
|
||||||
|
Loading…
Reference in New Issue
Block a user