Added splitters

This commit is contained in:
Dmitri Bogomolov 2018-11-07 18:28:42 +02:00
parent 49c9ef79f9
commit bc183adff5
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13
2 changed files with 313 additions and 278 deletions

View File

@ -21,8 +21,8 @@
<enum>QTabWidget::Rounded</enum>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<layout class="QVBoxLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
@ -64,173 +64,167 @@
<attribute name="title">
<string>Messages</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="STreeWidget" name="treeWidgetYourIdentities">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<column>
<property name="text">
<string>Identities</string>
</property>
<property name="icon">
<iconset>
<selectedoff>:/newPrefix/images/identities.png</selectedoff>
</iconset>
</property>
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonNewAddress">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="inboxLayout">
<item>
<widget class="SSplitter" name="inboxHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="inboxIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STreeWidget" name="treeWidgetYourIdentities">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<column>
<property name="text">
<string>Identities</string>
</property>
<property name="icon">
<iconset>
<selectedoff>:/newPrefix/images/identities.png</selectedoff>
</iconset>
</property>
</column>
</widget>
<widget class="QPushButton" name="pushButtonNewAddress">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="text">
<string>New Indentitiy</string>
</property>
</widget>
</widget>
<widget class="SSplitter" name="inboxMessagecontrolSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="searchLayout">
<item>
<widget class="QLineEdit" name="inboxSearchLineEdit">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="inboxSearchOption">
<item>
<property name="text">
<string>New Indentitiy</string>
<string>All</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_7">
<item>
<layout class="QHBoxLayout" name="horizontalLayoutSearch">
<property name="topMargin">
<number>0</number>
</item>
<item>
<property name="text">
<string>To</string>
</property>
<item>
<widget class="QLineEdit" name="inboxSearchLineEdit">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="inboxSearchOption">
<item>
<property name="text">
<string>All</string>
</property>
</item>
<item>
<property name="text">
<string>To</string>
</property>
</item>
<item>
<property name="text">
<string>From</string>
</property>
</item>
<item>
<property name="text">
<string>Subject</string>
</property>
</item>
<item>
<property name="text">
<string>Message</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="STableWidget" name="tableWidgetInbox">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</item>
<item>
<property name="text">
<string>From</string>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</item>
<item>
<property name="text">
<string>Subject</string>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</item>
<item>
<property name="text">
<string>Message</string>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>200</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>27</number>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>26</number>
</attribute>
<column>
<property name="text">
<string>To</string>
</property>
</column>
<column>
<property name="text">
<string>From</string>
</property>
</column>
<column>
<property name="text">
<string>Subject</string>
</property>
</column>
<column>
<property name="text">
<string>Received</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessage">
<property name="baseSize">
<size>
<width>0</width>
<height>500</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="STableWidget" name="tableWidgetInbox">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::ExtendedSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>true</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>200</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>27</number>
</attribute>
<attribute name="horizontalHeaderShowSortIndicator" stdset="0">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="verticalHeaderDefaultSectionSize">
<number>26</number>
</attribute>
<column>
<property name="text">
<string>To</string>
</property>
</column>
<column>
<property name="text">
<string>From</string>
</property>
</column>
<column>
<property name="text">
<string>Subject</string>
</property>
</column>
<column>
<property name="text">
<string>Received</string>
</property>
</column>
</widget>
<widget class="MessageView" name="textEditInboxMessage">
<property name="baseSize">
<size>
<width>0</width>
<height>500</height>
</size>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
@ -242,12 +236,16 @@
<attribute name="title">
<string>Send</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="sendLayout">
<item>
<widget class="SSplitter" name="sendHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="sendIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STableWidget" name="tableWidgetAddressBook">
<property name="maximumSize">
<size>
@ -298,8 +296,6 @@
</property>
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddAddressBook">
<property name="maximumSize">
<size>
@ -311,8 +307,6 @@
<string>Add Contact</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonFetchNamecoinID">
<property name="maximumSize">
<size>
@ -329,15 +323,14 @@
<string>Fetch Namecoin ID</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
</widget>
<widget class="SSplitter" name="sendMessagecontrolSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTabWidget" name="tabWidgetSend">
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="sendDirect">
<attribute name="title">
@ -464,9 +457,9 @@ p, li { white-space: pre-wrap; }
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<widget class="QWidget" name="sendControlsContainer">
<layout class="QHBoxLayout" name="sendControlsLayout">
<item>
<widget class="QPushButton" name="pushButtonTTL">
<property name="sizePolicy">
@ -601,14 +594,12 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</layout>
</widget>
</widget>
</widget>
</item>
</layout>
<zorder></zorder>
</widget>
<widget class="QWidget" name="subscriptions">
<attribute name="icon">
@ -618,12 +609,16 @@ p, li { white-space: pre-wrap; }
<attribute name="title">
<string>Subscriptions</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QVBoxLayout">
<item>
<widget class="SSplitter" name="subscriptionsHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="subscriptionsIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="STreeWidget" name="treeWidgetSubscriptions">
<property name="maximumSize">
<size>
@ -651,8 +646,6 @@ p, li { white-space: pre-wrap; }
</property>
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddSubscription">
<property name="maximumSize">
<size>
@ -664,52 +657,51 @@ p, li { white-space: pre-wrap; }
<string>Add new Subscription</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLineEdit" name="inboxSearchLineEditSubscriptions">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="inboxSearchOptionSubscriptions">
<item>
<property name="text">
<string>All</string>
</property>
</item>
<item>
<property name="text">
<string>To</string>
</property>
</item>
<item>
<property name="text">
<string>From</string>
</property>
</item>
<item>
<property name="text">
<string>Subject</string>
</property>
</item>
<item>
<property name="text">
<string>Message</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
</widget>
<widget class="SSplitter" name="subscriptionsMessagecontrolSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="searchLayout">
<item>
<widget class="QLineEdit" name="inboxSearchLineEditSubscriptions">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="inboxSearchOptionSubscriptions">
<item>
<property name="text">
<string>All</string>
</property>
</item>
<item>
<property name="text">
<string>To</string>
</property>
</item>
<item>
<property name="text">
<string>From</string>
</property>
</item>
<item>
<property name="text">
<string>Subject</string>
</property>
</item>
<item>
<property name="text">
<string>Message</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="STableWidget" name="tableWidgetInboxSubscriptions">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
@ -774,8 +766,6 @@ p, li { white-space: pre-wrap; }
</property>
</column>
</widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessageSubscriptions">
<property name="baseSize">
<size>
@ -787,14 +777,12 @@ p, li { white-space: pre-wrap; }
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<widget class="QWidget" name="chans">
<attribute name="icon">
<iconset resource="bitmessage_icons.qrc">
<normaloff>:/newPrefix/images/can-icon-16px.png</normaloff>:/newPrefix/images/can-icon-16px.png</iconset>
@ -802,12 +790,16 @@ p, li { white-space: pre-wrap; }
<attribute name="title">
<string>Chans</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<layout class="QVBoxLayout" name="chansLayout">
<item>
<widget class="SSplitter" name="chansHorizontalSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="SSplitter" name="chansIdentitiesSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QTreeWidget" name="treeWidgetChans">
<property name="maximumSize">
<size>
@ -841,8 +833,6 @@ p, li { white-space: pre-wrap; }
</property>
</column>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonAddChan">
<property name="maximumSize">
<size>
@ -854,21 +844,21 @@ p, li { white-space: pre-wrap; }
<string>Add Chan</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
</widget>
<widget class="SSplitter" name="chansMessagecontrolSplitter">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<widget class="QWidget" name="searchWidget">
<layout class="QHBoxLayout" name="searchLayout">
<item>
<widget class="QLineEdit" name="inboxSearchLineEditChans">
<property name="placeholderText">
<string>Search</string>
</property>
</widget>
</item>
<item>
</item>
<item>
<widget class="QComboBox" name="inboxSearchOptionChans">
<item>
<property name="text">
@ -896,10 +886,9 @@ p, li { white-space: pre-wrap; }
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
</item>
</layout>
</widget>
<widget class="STableWidget" name="tableWidgetInboxChans">
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
@ -964,8 +953,6 @@ p, li { white-space: pre-wrap; }
</property>
</column>
</widget>
</item>
<item>
<widget class="MessageView" name="textEditInboxMessageChans">
<property name="baseSize">
<size>
@ -977,10 +964,8 @@ p, li { white-space: pre-wrap; }
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
@ -1177,11 +1162,22 @@ p, li { white-space: pre-wrap; }
<extends>QTableWidget</extends>
<header>bitmessageqt.settingsmixin</header>
</customwidget>
<customwidget>
<class>SSplitter</class>
<extends>QSplitter</extends>
<header>bitmessageqt.settingsmixin</header>
<container>1</container>
</customwidget>
<customwidget>
<class>MessageCompose</class>
<extends>QTextEdit</extends>
<header>bitmessageqt.messagecompose</header>
</customwidget>
<customwidget>
<class>MessagelistControl</class>
<extends>SSplitter</extends>
<header>bitmessageqt.messagelist</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>tableWidgetInbox</tabstop>

View File

@ -23,6 +23,45 @@ class Window(settingsmixin.SMainWindow, RetranslateMixin):
self.addressBookCompleter.setModel(self.addressBookCompleterModel)
self.lineEditTo.setCompleter(self.addressBookCompleter)
# splitters
for splitter in (
self.inboxHorizontalSplitter,
self.sendHorizontalSplitter,
self.subscriptionsHorizontalSplitter,
self.chansHorizontalSplitter
):
splitter.setStretchFactor(0, 0)
splitter.setStretchFactor(1, 1)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
for splitter in (
self.inboxIdentitiesSplitter,
self.sendIdentitiesSplitter,
self.subscriptionsIdentitiesSplitter,
self.chansIdentitiesSplitter
):
splitter.setStretchFactor(0, 1)
splitter.setStretchFactor(1, 0)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
splitter.handle(1).setEnabled(False)
for splitter in (
self.inboxMessagecontrolSplitter,
self.subscriptionsMessagecontrolSplitter,
self.chansMessagecontrolSplitter
):
splitter.setStretchFactor(0, 0)
splitter.setStretchFactor(1, 1)
splitter.setStretchFactor(2, 2)
splitter.setCollapsible(0, False)
splitter.setCollapsible(1, False)
splitter.setCollapsible(2, False)
splitter.handle(1).setEnabled(False)
self.sendMessagecontrolSplitter.handle(1).setEnabled(False)
def updateNetworkSwitchMenuLabel(self, dontconnect=None):
"""
Set the label for "Go online"/"Go offline" menu action