Skip to content

Commit

Permalink
[Qt4] Finish fixing chat window layout
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandernst committed Jun 19, 2010
1 parent 47667d6 commit 2a175ca
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 94 deletions.
218 changes: 127 additions & 91 deletions amsn2/ui/front_ends/qt4/chatWindow.ui
Expand Up @@ -42,7 +42,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<width>1</width>
<height>20</height>
</size>
</property>
Expand Down Expand Up @@ -110,7 +110,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<width>1</width>
<height>20</height>
</size>
</property>
Expand All @@ -119,108 +119,144 @@
</layout>
</widget>
<widget class="QWidget" name="">
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QToolBar" name="toolBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>32</height>
</size>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="baseSize">
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>32</height>
<height>20</height>
</size>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="windowTitle">
<string>Quick Actions</string>
</property>
<property name="movable">
<bool>false</bool>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0,0">
<property name="leftMargin">
<number>0</number>
</property>
<addaction name="actionInsert_Emoticon"/>
<addaction name="actionNudge"/>
</widget>
<item>
<widget class="QToolBar" name="toolBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>32</height>
</size>
</property>
<property name="sizeIncrement">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="baseSize">
<size>
<width>0</width>
<height>32</height>
</size>
</property>
<property name="acceptDrops">
<bool>true</bool>
</property>
<property name="windowTitle">
<string>Quick Actions</string>
</property>
<property name="movable">
<bool>false</bool>
</property>
<addaction name="actionInsert_Emoticon"/>
<addaction name="actionNudge"/>
</widget>
</item>
<item>
<widget class="QSplitter" name="splitter_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTextEdit" name="inputWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>Contact image</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QSplitter" name="splitter_2">
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTextEdit" name="inputWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextEditable|Qt::TextEditorInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="text">
<string>Contact image</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
Expand Down
9 changes: 6 additions & 3 deletions amsn2/ui/front_ends/qt4/chat_window.py
Expand Up @@ -55,12 +55,15 @@ def __init__(self, amsn_conversation, parent, contacts_uid):
self.ui = Ui_ChatWindow()
self.ui.setupUi(self)
self._statusBar = QStatusBar(self)
self._statusBar.setFixedHeight(14)
self._statusBar.setSizeGripEnabled(False)
self.layout().addWidget(self._statusBar)
self.ui.inputWidget.installEventFilter(self)
self.cursor = QTextCursor(self.ui.inputWidget.document())
#self.ui.splitter.setStretchFactor(0, 95)
#self.ui.splitter_2.setStretchFactor(0, 95)
#self.ui.splitter_3.setStretchFactor(0, 95)
self.ui.splitter.setStretchFactor(0, 95)
self.ui.splitter_2.setStretchFactor(0, 95)
self.ui.splitter_3.setStretchFactor(0, 95)
self.ui.splitter_3.setStretchFactor(1, 1)
self.last_sender = ''
self.nickstyle = "color:#555555; margin-left:2px"
self.msgstyle = "margin-left:15px"
Expand Down

0 comments on commit 2a175ca

Please sign in to comment.