~ubuntu-branches/ubuntu/jaunty/quassel/jaunty

« back to all changes in this revision

Viewing changes to debian/patches/quassel_14_fix_topic_widget.patch

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-11-17 15:22:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081117152246-3lwlpnr4r08910kv
Tags: 0.3.1-0ubuntu1
* New upstream release (LP: #271403)
* Drop all patches originated from upstream (quassel_*)
* Compile with non-builtin quassel icons
  + Introduce new quassel-data package
  + quassel and quassel-client depend on quassel-data
  + Don't manually enforce icon installation for desktop files in debian/rules
  + Add quassel_01_fix_iconloader.patch
* Drop perl build dependency, I have no clue why it was added in the first
  place. Neither changelog nor Bazaar knows, and since quassel compiles just
  fine without it, removing it should be save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
5
 
@@ -32,6 +32,8 @@
6
 
   ui.topicLineEdit->hide();
7
 
   ui.topicLineEdit->installEventFilter(this);
8
 
   ui.topicLabel->show();
9
 
+  setContentsMargins(0,0,0,0);
10
 
+  parent->setMinimumHeight(layout()->sizeHint().height() + 2*qApp->style()->pixelMetric(QStyle::PM_DockWidgetTitleBarButtonMargin));
11
 
 }
12
 
 
13
 
 void TopicWidget::currentChanged(const QModelIndex &current, const QModelIndex &previous) {
14
 
@@ -74,6 +76,11 @@
15
 
   ui.topicEditButton->hide();
16
 
   ui.topicLineEdit->show();
17
 
   ui.topicLineEdit->setFocus();
18
 
+
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();
23
 
 }
24
 
 
25
 
 void TopicWidget::switchPlain() {
26
 
@@ -81,6 +88,10 @@
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();
34
 
 }
35
 
 
36
 
 // filter for the input widget to switch back to normal mode
37
 
@@ -102,4 +113,3 @@
38
 
   
39
 
   return false;
40
 
 }
41
 
-
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
46
 
@@ -5,12 +5,12 @@
47
 
    <rect>
48
 
     <x>0</x>
49
 
     <y>0</y>
50
 
-    <width>611</width>
51
 
-    <height>36</height>
52
 
+    <width>644</width>
53
 
+    <height>35</height>
54
 
    </rect>
55
 
   </property>
56
 
   <property name="sizePolicy" >
57
 
-   <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
58
 
+   <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
59
 
     <horstretch>0</horstretch>
60
 
     <verstretch>0</verstretch>
61
 
    </sizepolicy>
62
 
@@ -30,22 +30,44 @@
63
 
   <property name="windowTitle" >
64
 
    <string>Form</string>
65
 
   </property>
66
 
-  <layout class="QHBoxLayout" >
67
 
+  <layout class="QHBoxLayout" name="horizontalLayout" >
68
 
+   <property name="sizeConstraint" >
69
 
+    <enum>QLayout::SetDefaultConstraint</enum>
70
 
+   </property>
71
 
    <property name="margin" >
72
 
-    <number>4</number>
73
 
+    <number>0</number>
74
 
    </property>
75
 
    <item>
76
 
     <widget class="TopicLabel" name="topicLabel" >
77
 
+     <property name="sizePolicy" >
78
 
+      <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
79
 
+       <horstretch>0</horstretch>
80
 
+       <verstretch>0</verstretch>
81
 
+      </sizepolicy>
82
 
+     </property>
83
 
      <property name="frameShape" >
84
 
       <enum>QFrame::StyledPanel</enum>
85
 
      </property>
86
 
      <property name="frameShadow" >
87
 
-      <enum>QFrame::Raised</enum>
88
 
+      <enum>QFrame::Plain</enum>
89
 
      </property>
90
 
     </widget>
91
 
    </item>
92
 
    <item>
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>
99
 
+      </sizepolicy>
100
 
+     </property>
101
 
+     <property name="frame" >
102
 
+      <bool>true</bool>
103
 
+     </property>
104
 
+     <property name="alignment" >
105
 
+      <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
106
 
+     </property>
107
 
+    </widget>
108
 
    </item>
109
 
    <item>
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
115
 
@@ -20,6 +20,7 @@
116
 
 
117
 
 #include "verticaldock.h"
118
 
 
119
 
+#include <QLayout>
120
 
 #include <QPainter>
121
 
 
122
 
 #include <QDebug>
123
 
@@ -34,7 +35,7 @@
124
 
 }
125
 
 
126
 
 QSize VerticalDockTitle::minimumSizeHint() const {
127
 
-  return QSize(10, 15);
128
 
+  return QSize(10, 10);
129
 
 }
130
 
 
131
 
 void VerticalDockTitle::paintEvent(QPaintEvent *event) {
132
 
@@ -44,16 +45,13 @@
133
 
   
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());
141
 
     }
142
 
   }
143
 
-
144
 
 }
145
 
 
146
 
-
147
 
-
148
 
 // ==============================
149
 
 //  Vertical Dock
150
 
 // ==============================
151
 
@@ -67,6 +65,7 @@
152
 
   : QDockWidget(parent, flags)
153
 
 {
154
 
   setDefaultTitleWidget();
155
 
+  setContentsMargins(0, 0, 0, 0);
156
 
 }
157
 
 
158
 
 void VerticalDock::setDefaultTitleWidget() {