From e10b9cbff4e1cdad9500d2b6b0b2124926ea4429 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Tue, 6 Oct 2015 18:58:23 +0200 Subject: [PATCH] Resizable fields Inbox folder/message now resizable --- src/bitmessageqt/bitmessageui.py | 33 +++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/bitmessageqt/bitmessageui.py b/src/bitmessageqt/bitmessageui.py index 36ccbbb0..7012d0d7 100644 --- a/src/bitmessageqt/bitmessageui.py +++ b/src/bitmessageqt/bitmessageui.py @@ -69,14 +69,15 @@ class Ui_MainWindow(object): self.pushButtonNewAddress.setObjectName(_fromUtf8("pushButtonNewAddress")) self.verticalLayout_12.addWidget(self.pushButtonNewAddress) self.horizontalLayout_3.addLayout(self.verticalLayout_12) - self.verticalLayout_7 = QtGui.QVBoxLayout() - self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7")) - self.horizontalLayoutSearch = QtGui.QHBoxLayout() - self.horizontalLayoutSearch.setContentsMargins(-1, 0, -1, -1) - self.horizontalLayoutSearch.setObjectName(_fromUtf8("horizontalLayoutSearch")) + 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")) - self.horizontalLayoutSearch.addWidget(self.inboxSearchLineEdit) + self.horizontalSplitterSearch.addWidget(self.inboxSearchLineEdit) self.inboxSearchOption = QtGui.QComboBox(self.inbox) self.inboxSearchOption.setObjectName(_fromUtf8("inboxSearchOption")) self.inboxSearchOption.addItem(_fromUtf8("")) @@ -84,8 +85,11 @@ class Ui_MainWindow(object): self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) self.inboxSearchOption.addItem(_fromUtf8("")) - self.horizontalLayoutSearch.addWidget(self.inboxSearchOption) - self.verticalLayout_7.addLayout(self.horizontalLayoutSearch) + self.horizontalSplitterSearch.addWidget(self.inboxSearchOption) + self.horizontalSplitterSearch.handle(1).setEnabled(False) + self.horizontalSplitterSearch.setStretchFactor(0, 1) + self.horizontalSplitterSearch.setStretchFactor(1, 0) + self.verticalSplitter_7.addWidget(self.horizontalSplitterSearch) self.tableWidgetInbox = QtGui.QTableWidget(self.inbox) self.tableWidgetInbox.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers) self.tableWidgetInbox.setAlternatingRowColors(True) @@ -111,13 +115,20 @@ class Ui_MainWindow(object): self.tableWidgetInbox.horizontalHeader().setStretchLastSection(True) self.tableWidgetInbox.verticalHeader().setVisible(False) self.tableWidgetInbox.verticalHeader().setDefaultSectionSize(26) - self.verticalLayout_7.addWidget(self.tableWidgetInbox) + self.verticalSplitter_7.addWidget(self.tableWidgetInbox) self.textEditInboxMessage = QtGui.QTextEdit(self.inbox) self.textEditInboxMessage.setBaseSize(QtCore.QSize(0, 500)) self.textEditInboxMessage.setReadOnly(True) self.textEditInboxMessage.setObjectName(_fromUtf8("textEditInboxMessage")) - self.verticalLayout_7.addWidget(self.textEditInboxMessage) - self.horizontalLayout_3.addLayout(self.verticalLayout_7) + self.verticalSplitter_7.addWidget(self.textEditInboxMessage) + self.verticalSplitter_7.setStretchFactor(0, 0) + self.verticalSplitter_7.setStretchFactor(1, 1) + self.verticalSplitter_7.setStretchFactor(2, 2) + self.verticalSplitter_7.setCollapsible(0, False) + 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) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/newPrefix/images/inbox.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)