1
Index: quassel-0.3.0/src/qtui/topicwidget.cpp
2
===================================================================
3
--- quassel-0.3.0.orig/src/qtui/topicwidget.cpp 2008-08-27 15:48:56.000000000 +0200
4
+++ quassel-0.3.0/src/qtui/topicwidget.cpp 2008-10-13 20:30:57.000000000 +0200
6
ui.topicLineEdit->hide();
7
ui.topicLineEdit->installEventFilter(this);
9
+ setContentsMargins(0,0,0,0);
10
+ parent->setMinimumHeight(layout()->sizeHint().height() + 2*qApp->style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin));
13
void TopicWidget::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) {
15
ui.topicEditButton->hide();
16
ui.topicLineEdit->show();
17
ui.topicLineEdit->setFocus();
19
+ setFixedHeight(layout()->sizeHint().height());
20
+ // Update the dock widget too, else it won't resize in all styles... FIXME try to sanitize this
21
+ qobject_cast<QWidget *>(parent())->setMinimumHeight(height() + 2*qApp->style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin));
22
+ qobject_cast<QWidget *>(parent())->adjustSize();
25
void TopicWidget::switchPlain() {
27
ui.topicLabel->show();
28
ui.topicEditButton->show();
29
ui.topicLineEdit->setText(_topic);
30
+ setFixedHeight(layout()->sizeHint().height());
31
+ // Update the dock widget too, else it won't resize in all styles... FIXME try to sanitize this
32
+ qobject_cast<QWidget *>(parent())->setMinimumHeight(height() + 2*qApp->style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin));
33
+ qobject_cast<QWidget *>(parent())->adjustSize();
36
// filter for the input widget to switch back to normal mode
42
Index: quassel-0.3.0/src/qtui/ui/topicwidget.ui
43
===================================================================
44
--- quassel-0.3.0.orig/src/qtui/ui/topicwidget.ui 2008-08-27 15:48:56.000000000 +0200
45
+++ quassel-0.3.0/src/qtui/ui/topicwidget.ui 2008-10-13 20:30:57.000000000 +0200
56
<property name="sizePolicy" >
57
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
58
+ <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
59
<horstretch>0</horstretch>
60
<verstretch>0</verstretch>
63
<property name="windowTitle" >
66
- <layout class="QHBoxLayout" >
67
+ <layout class="QHBoxLayout" name="horizontalLayout" >
68
+ <property name="sizeConstraint" >
69
+ <enum>QLayout::SetDefaultConstraint</enum>
71
<property name="margin" >
76
<widget class="TopicLabel" name="topicLabel" >
77
+ <property name="sizePolicy" >
78
+ <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
79
+ <horstretch>0</horstretch>
80
+ <verstretch>0</verstretch>
83
<property name="frameShape" >
84
<enum>QFrame::StyledPanel</enum>
86
<property name="frameShadow" >
87
- <enum>QFrame::Raised</enum>
88
+ <enum>QFrame::Plain</enum>
93
- <widget class="ClearableLineEdit" name="topicLineEdit" />
94
+ <widget class="ClearableLineEdit" name="topicLineEdit" >
95
+ <property name="sizePolicy" >
96
+ <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding" >
97
+ <horstretch>0</horstretch>
98
+ <verstretch>0</verstretch>
101
+ <property name="frame" >
104
+ <property name="alignment" >
105
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
110
<widget class="ClickableLabel" name="topicEditButton" >
111
Index: quassel-0.3.0/src/qtui/verticaldock.cpp
112
===================================================================
113
--- quassel-0.3.0.orig/src/qtui/verticaldock.cpp 2008-08-27 15:48:56.000000000 +0200
114
+++ quassel-0.3.0/src/qtui/verticaldock.cpp 2008-10-13 20:30:57.000000000 +0200
117
#include "verticaldock.h"
126
QSize VerticalDockTitle::minimumSizeHint() const {
127
- return QSize(10, 15);
128
+ return QSize(10, 10);
131
void VerticalDockTitle::paintEvent(QPaintEvent *event) {
134
if(rect().isValid() && rect().height() > minimumSizeHint().height()) {
135
for(int i = 0; i < 2; i++) {
136
- QPoint topLeft = rect().topLeft() + QPoint(3 + i*2, 5);
137
- QPoint bottomRight = rect().topLeft() + QPoint(3 + i*2, rect().height() - 5);
138
+ QPoint topLeft = rect().topLeft() + QPoint(3 + i*2, 2);
139
+ QPoint bottomRight = rect().topLeft() + QPoint(3 + i*2, rect().height() - 2);
140
qDrawShadeLine(&painter, topLeft, bottomRight, palette());
148
// ==============================
150
// ==============================
152
: QDockWidget(parent, flags)
154
setDefaultTitleWidget();
155
+ setContentsMargins(0, 0, 0, 0);
158
void VerticalDock::setDefaultTitleWidget() {