[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:18:58 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=ffbd8a4
The following commit has been merged in the master branch:
commit ffbd8a42c515fdfe8f3df6acc86f1485d16700ba
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Fri Feb 11 23:07:02 2011 +0000
Resize textbox to be at most 1/3 of the total chat window size.
---
lib/chatwidget.cpp | 13 +++++++++++++
lib/chatwidget.h | 1 +
lib/chatwidget.ui | 11 +++++++++--
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/lib/chatwidget.cpp b/lib/chatwidget.cpp
index 2d57f49..137aa60 100644
--- a/lib/chatwidget.cpp
+++ b/lib/chatwidget.cpp
@@ -210,6 +210,17 @@ void ChatWidget::changeEvent(QEvent *e)
}
}
+void ChatWidget::resizeEvent(QResizeEvent *e)
+{
+ //set the maximum height of a text box to a third of the total window height (but no smaller than the minimum size)
+ int textBoxHeight = e->size().height() / 3;
+ if (textBoxHeight < d->ui.sendMessageBox->minimumSizeHint().height()) {
+ textBoxHeight = d->ui.sendMessageBox->minimumSizeHint().height();
+ }
+ d->ui.sendMessageBox->setMaximumHeight(textBoxHeight);
+ QWidget::resizeEvent(e);
+}
+
QString ChatWidget::title() const
{
@@ -534,5 +545,7 @@ KIcon ChatWidget::iconForPresence(Tp::ConnectionPresenceType presence)
return KIcon(iconName);
}
+
+
#include "chatwidget.moc" //for MessageBoxEventFilter
#include "moc_chatwidget.cpp" //for ChatWidget
diff --git a/lib/chatwidget.h b/lib/chatwidget.h
index dff8a1e..95d4eb6 100644
--- a/lib/chatwidget.h
+++ b/lib/chatwidget.h
@@ -46,6 +46,7 @@ public:
protected:
void changeEvent(QEvent *e);
+ void resizeEvent(QResizeEvent *);
protected slots:
/** Show the received message in the chat window*/
diff --git a/lib/chatwidget.ui b/lib/chatwidget.ui
index 8c74787..338729d 100644
--- a/lib/chatwidget.ui
+++ b/lib/chatwidget.ui
@@ -21,7 +21,14 @@
<number>4</number>
</property>
<item>
- <widget class="AdiumThemeView" name="chatArea" native="true"/>
+ <widget class="AdiumThemeView" name="chatArea" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
</item>
<item>
<widget class="QWidget" name="formatToolbar" native="true">
@@ -123,7 +130,7 @@
<property name="maximumSize">
<size>
<width>16777215</width>
- <height>100</height>
+ <height>16777215</height>
</size>
</property>
<property name="frameShape">
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list