TTL/Send tab fixes

Now stretches correctly and does not unnecessarily shorten the text.
This commit is contained in:
Peter Šurda 2016-04-28 00:36:54 +02:00
parent ddb48cad86
commit 658d52fb4f

View File

@ -283,14 +283,17 @@ class Ui_MainWindow(object):
self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1) self.gridLayout_9.addWidget(self.verticalSplitter_6, 0, 0, 1, 1)
self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8("")) self.tabWidgetSend.addTab(self.sendBroadcast, _fromUtf8(""))
self.verticalSplitter.addWidget(self.tabWidgetSend) self.verticalSplitter.addWidget(self.tabWidgetSend)
self.horizontalSplitter_5 = QtGui.QSplitter() self.tTLContainer = QtGui.QWidget()
self.horizontalSplitter_5.setObjectName(_fromUtf8("horizontalSplitter_5")) self.tTLContainer.setSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
self.horizontalLayout_5 = QtGui.QHBoxLayout()
self.tTLContainer.setLayout(self.horizontalLayout_5)
self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
self.pushButtonTTL = QtGui.QPushButton(self.send) self.pushButtonTTL = QtGui.QPushButton(self.send)
# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
# sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
# sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
# sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.pushButtonTTL.sizePolicy().hasHeightForWidth())
# self.pushButtonTTL.setSizePolicy(sizePolicy) self.pushButtonTTL.setSizePolicy(sizePolicy)
palette = QtGui.QPalette() palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(0, 0, 255)) brush = QtGui.QBrush(QtGui.QColor(0, 0, 255))
brush.setStyle(QtCore.Qt.SolidPattern) brush.setStyle(QtCore.Qt.SolidPattern)
@ -307,44 +310,31 @@ class Ui_MainWindow(object):
self.pushButtonTTL.setFont(font) self.pushButtonTTL.setFont(font)
self.pushButtonTTL.setFlat(True) self.pushButtonTTL.setFlat(True)
self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL")) self.pushButtonTTL.setObjectName(_fromUtf8("pushButtonTTL"))
self.horizontalSplitter_5.addWidget(self.pushButtonTTL) self.horizontalLayout_5.addWidget(self.pushButtonTTL, 0, QtCore.Qt.AlignRight)
self.horizontalSliderTTL = QtGui.QSlider(self.send) self.horizontalSliderTTL = QtGui.QSlider(self.send)
self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0)) self.horizontalSliderTTL.setMinimumSize(QtCore.QSize(35, 0))
self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal) self.horizontalSliderTTL.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSliderTTL.setInvertedAppearance(False) self.horizontalSliderTTL.setInvertedAppearance(False)
self.horizontalSliderTTL.setInvertedControls(False) self.horizontalSliderTTL.setInvertedControls(False)
self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL")) self.horizontalSliderTTL.setObjectName(_fromUtf8("horizontalSliderTTL"))
self.horizontalSplitter_5.addWidget(self.horizontalSliderTTL) self.horizontalLayout_5.addWidget(self.horizontalSliderTTL, 0, QtCore.Qt.AlignLeft)
self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send) self.labelHumanFriendlyTTLDescription = QtGui.QLabel(self.send)
# sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
# sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
# sizePolicy.setVerticalStretch(0) sizePolicy.setVerticalStretch(0)
# sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.labelHumanFriendlyTTLDescription.sizePolicy().hasHeightForWidth())
# self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy) self.labelHumanFriendlyTTLDescription.setSizePolicy(sizePolicy)
self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0)) self.labelHumanFriendlyTTLDescription.setMinimumSize(QtCore.QSize(45, 0))
self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription")) self.labelHumanFriendlyTTLDescription.setObjectName(_fromUtf8("labelHumanFriendlyTTLDescription"))
self.horizontalSplitter_5.addWidget(self.labelHumanFriendlyTTLDescription) self.horizontalLayout_5.addWidget(self.labelHumanFriendlyTTLDescription, 1, QtCore.Qt.AlignLeft)
self.pushButtonSend = QtGui.QPushButton(self.send) self.pushButtonSend = QtGui.QPushButton(self.send)
self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend")) self.pushButtonSend.setObjectName(_fromUtf8("pushButtonSend"))
self.horizontalSplitter_5.addWidget(self.pushButtonSend) self.horizontalLayout_5.addWidget(self.pushButtonSend, 0, QtCore.Qt.AlignRight)
self.pushButtonTTL.setMaximumSize(QtCore.QSize(32, self.pushButtonSend.height()))
self.labelHumanFriendlyTTLDescription.setMaximumSize(QtCore.QSize(45, self.pushButtonSend.height()))
self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, self.pushButtonSend.height())) self.horizontalSliderTTL.setMaximumSize(QtCore.QSize(70, self.pushButtonSend.height()))
self.horizontalSplitter_5.resize(self.horizontalSplitter_5.width(), self.pushButtonSend.height()) self.verticalSplitter.addWidget(self.tTLContainer)
self.horizontalSplitter_5.setStretchFactor(0, 0) self.tTLContainer.adjustSize()
self.horizontalSplitter_5.setStretchFactor(1, 0) self.verticalSplitter.setStretchFactor(1, 0)
self.horizontalSplitter_5.setStretchFactor(2, 0) self.verticalSplitter.setStretchFactor(0, 1)
self.horizontalSplitter_5.setStretchFactor(3, 1)
self.horizontalSplitter_5.setCollapsible(0, False)
self.horizontalSplitter_5.setCollapsible(1, False)
self.horizontalSplitter_5.setCollapsible(2, False)
self.horizontalSplitter_5.setCollapsible(3, False)
self.horizontalSplitter_5.handle(1).setEnabled(False)
self.horizontalSplitter_5.handle(2).setEnabled(False)
self.horizontalSplitter_5.handle(3).setEnabled(False)
self.verticalSplitter.addWidget(self.horizontalSplitter_5)
self.verticalSplitter.setStretchFactor(0, 0)
self.verticalSplitter.setStretchFactor(1, 1)
self.verticalSplitter.setCollapsible(0, False) self.verticalSplitter.setCollapsible(0, False)
self.verticalSplitter.setCollapsible(1, False) self.verticalSplitter.setCollapsible(1, False)
self.verticalSplitter.handle(1).setEnabled(False) self.verticalSplitter.handle(1).setEnabled(False)