From 001ec14d72d669f6317380cc1ea63e00d5303fa0 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sat, 10 Oct 2015 19:59:44 +0200 Subject: [PATCH] Messages tab resizable - the separator between folder tree and message list is now resizable - the separator between list of messages and message content is resizable - only for message tab, chans, subscriptions and others are still not resizable --- src/bitmessageqt/bitmessageui.py | 34 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 7012d0d7..26493241 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -53,27 +53,32 @@ class Ui_MainWindow(object): self.inbox.setObjectName(_fromUtf8("inbox")) self.gridLayout = QtGui.QGridLayout(self.inbox) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) - self.horizontalLayout_3 = QtGui.QHBoxLayout() - self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) - self.verticalLayout_12 = QtGui.QVBoxLayout() - self.verticalLayout_12.setObjectName(_fromUtf8("verticalLayout_12")) + self.horizontalSplitter_3 = QtGui.QSplitter() + self.horizontalSplitter_3.setObjectName(_fromUtf8("horizontalSplitter_3")) + self.verticalSplitter_12 = QtGui.QSplitter() + self.verticalSplitter_12.setObjectName(_fromUtf8("verticalSplitter_12")) + self.verticalSplitter_12.setOrientation(QtCore.Qt.Vertical) self.treeWidgetYourIdentities = QtGui.QTreeWidget(self.inbox) - self.treeWidgetYourIdentities.setMaximumSize(QtCore.QSize(200, 16777215)) self.treeWidgetYourIdentities.setObjectName(_fromUtf8("treeWidgetYourIdentities")) + self.treeWidgetYourIdentities.resize(200, self.treeWidgetYourIdentities.height()) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/identities.png")), QtGui.QIcon.Selected, QtGui.QIcon.Off) self.treeWidgetYourIdentities.headerItem().setIcon(0, icon1) - self.verticalLayout_12.addWidget(self.treeWidgetYourIdentities) + self.verticalSplitter_12.addWidget(self.treeWidgetYourIdentities) self.pushButtonNewAddress = QtGui.QPushButton(self.inbox) - self.pushButtonNewAddress.setMaximumSize(QtCore.QSize(200, 16777215)) self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) - self.verticalLayout_12.addWidget(self.pushButtonNewAddress) - self.horizontalLayout_3.addLayout(self.verticalLayout_12) + self.pushButtonNewAddress.resize(200, self.pushButtonNewAddress.height()) + self.verticalSplitter_12.addWidget(self.pushButtonNewAddress) + self.verticalSplitter_12.setStretchFactor(0, 1) + self.verticalSplitter_12.setStretchFactor(1, 0) + self.verticalSplitter_12.setCollapsible(0, False) + self.verticalSplitter_12.setCollapsible(1, False) + self.verticalSplitter_12.handle(1).setEnabled(False) + self.horizontalSplitter_3.addWidget(self.verticalSplitter_12) self.verticalSplitter_7 = QtGui.QSplitter() self.verticalSplitter_7.setObjectName(_fromUtf8("verticalSplitter_7")) self.verticalSplitter_7.setOrientation(QtCore.Qt.Vertical) self.horizontalSplitterSearch = QtGui.QSplitter() - self.horizontalSplitterSearch.setContentsMargins(0, 0, 0, 0) self.horizontalSplitterSearch.setObjectName(_fromUtf8("horizontalSplitterSearch")) self.inboxSearchLineEdit = QtGui.QLineEdit(self.inbox) self.inboxSearchLineEdit.setObjectName(_fromUtf8("inboxSearchLineEdit")) @@ -85,6 +90,7 @@ class Ui_MainWindow(object): self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) + self.inboxSearchOption.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents) self.horizontalSplitterSearch.addWidget(self.inboxSearchOption) self.horizontalSplitterSearch.handle(1).setEnabled(False) self.horizontalSplitterSearch.setStretchFactor(0, 1) @@ -128,8 +134,12 @@ class Ui_MainWindow(object): self.verticalSplitter_7.setCollapsible(1, False) self.verticalSplitter_7.setCollapsible(2, False) self.verticalSplitter_7.handle(1).setEnabled(False) - self.horizontalLayout_3.addWidget(self.verticalSplitter_7) - self.gridLayout.addLayout(self.horizontalLayout_3, 0, 0, 1, 1) + self.horizontalSplitter_3.addWidget(self.verticalSplitter_7) + self.horizontalSplitter_3.setStretchFactor(0, 0) + self.horizontalSplitter_3.setStretchFactor(1, 1) + self.horizontalSplitter_3.setCollapsible(0, False) + self.horizontalSplitter_3.setCollapsible(1, False) + self.gridLayout.addWidget(self.horizontalSplitter_3) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.tabWidget.addTab(self.inbox, icon2, _fromUtf8(""))