Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 258758 | Differences between
and this patch

Collapse All | Expand All

(-)applets/lancelot/libs/lancelot/Global.cpp~ (+5 lines)
Lines 326-333 Link Here
326
326
327
    d->confMain = new KConfig("lancelot" + app + "rc");
327
    d->confMain = new KConfig("lancelot" + app + "rc");
328
328
329
    Plasma::Theme::defaultTheme()->setUseGlobalSettings(true);
330
    qDebug() << "What is the plasma theme: " << Plasma::Theme::defaultTheme()->themeName();
329
    QString search = "desktoptheme/" + Plasma::Theme::defaultTheme()->themeName() + "/lancelot/" + app + "theme.config";
331
    QString search = "desktoptheme/" + Plasma::Theme::defaultTheme()->themeName() + "/lancelot/" + app + "theme.config";
330
    kDebug() << search;
332
    kDebug() << search;
333
    qDebug() << "Trying:" << search;
331
334
332
    QString path =  KStandardDirs::locate( "data", search );
335
    QString path =  KStandardDirs::locate( "data", search );
333
    if (path == "") {
336
    if (path == "") {
Lines 338-343 Link Here
338
        path = "lancelotrc";
341
        path = "lancelotrc";
339
    }
342
    }
340
    kDebug() << path;
343
    kDebug() << path;
344
    
345
    qDebug() << "Using theme:" << path;
341
    d->confTheme = new KConfig(path);
346
    d->confTheme = new KConfig(path);
342
347
343
    Instance::Private::activeInstance = this;
348
    Instance::Private::activeInstance = this;
(-)applets/lancelot/libs/lancelot/widgets/PassagewayView.cpp~ (-6 / +21 lines)
Lines 20-25 Link Here
20
#include "PassagewayView.h"
20
#include "PassagewayView.h"
21
21
22
#include <QWidget>
22
#include <QWidget>
23
#include <QGraphicsSceneMouseEvent>
24
#include <QGraphicsView>
25
#include <QApplication>
26
#include <climits>
23
27
24
namespace Lancelot {
28
namespace Lancelot {
25
29
Lines 65-70 Link Here
65
      : layout(NULL), buttonsLayout(NULL), listsLayout(NULL), parent(p), focusIndex(0)
69
      : layout(NULL), buttonsLayout(NULL), listsLayout(NULL), parent(p), focusIndex(0)
66
    {
70
    {
67
        parent->setLayout(layout = new NodeLayout());
71
        parent->setLayout(layout = new NodeLayout());
72
        layout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
73
        layout->setMaximumSize(INT_MAX, INT_MAX);
68
74
69
        layout->addItem(
75
        layout->addItem(
70
            buttonsLayout = new QGraphicsLinearLayout(Qt::Horizontal),
76
            buttonsLayout = new QGraphicsLinearLayout(Qt::Horizontal),
Lines 72-77 Link Here
72
            NodeLayout::NodeCoordinate(1, 0, 0, 32)
78
            NodeLayout::NodeCoordinate(1, 0, 0, 32)
73
        );
79
        );
74
80
81
        buttonsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
82
        buttonsLayout->setMaximumSize(INT_MAX, INT_MAX);
83
        
75
        ExtenderButton * spacer =
84
        ExtenderButton * spacer =
76
            new ExtenderButton(parent);
85
            new ExtenderButton(parent);
77
        spacer->setGroupByName("PassagewayView-Spacer");
86
        spacer->setGroupByName("PassagewayView-Spacer");
Lines 88-93 Link Here
88
97
89
        listsLayout->setSizer(new PassagewayViewSizer());
98
        listsLayout->setSizer(new PassagewayViewSizer());
90
99
100
        listsLayout->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
101
        listsLayout->setMaximumSize(INT_MAX, INT_MAX);
102
91
        buttonsLayout->setSpacing(0.0);
103
        buttonsLayout->setSpacing(0.0);
92
104
93
        next(Step("", QIcon(), entranceModel));
105
        next(Step("", QIcon(), entranceModel));
Lines 161-167 Link Here
161
            path.takeLast();
173
            path.takeLast();
162
174
163
            buttonsLayout->removeItem(button);
175
            buttonsLayout->removeItem(button);
164
            layout->activate();
176
177
            // This really shouldn't be needed :(
178
            buttonsLayout->setGeometry(buttonsLayout->geometry());
179
            
180
            
165
            listsLayout->pop();
181
            listsLayout->pop();
166
182
167
            button->deleteLater();
183
            button->deleteLater();
Lines 196-214 Link Here
196
        list->setCategoriesGroupByName("ActionListView-CategoriesPass");
212
        list->setCategoriesGroupByName("ActionListView-CategoriesPass");
197
        list->setCategoriesActivable(true);
213
        list->setCategoriesActivable(true);
198
214
199
        // if (lists.count() > 0) {
200
        //     lists.last()->clearSelection();
201
        // }
202
203
        focusIndex = lists.count();
215
        focusIndex = lists.count();
204
        lists.append(list);
216
        lists.append(list);
205
217
206
        // list->initialSelection();
207
        path.append(step);
218
        path.append(step);
208
219
209
        buttonsLayout->addItem(button);
220
        buttonsLayout->addItem(button);
210
        listsLayout->push(list);
221
        listsLayout->push(list);
211
222
223
        // This really shouldn't be needed :(
224
        buttonsLayout->setGeometry(buttonsLayout->geometry());
225
        listsLayout->setGeometry(listsLayout->geometry());
226
212
        QObject::connect(
227
        QObject::connect(
213
            list, SIGNAL(activated(int)),
228
            list, SIGNAL(activated(int)),
214
            parent, SLOT(listItemActivated(int))
229
            parent, SLOT(listItemActivated(int))
(-)applets/lancelot/app/src/models/ContactsKopete.cpp (-1 / +1 lines)
Lines 22-28 Link Here
22
#include <KStandardDirs>
22
#include <KStandardDirs>
23
#include <KDebug>
23
#include <KDebug>
24
24
25
#define UPDATE_INTERVAL 30000
25
#define UPDATE_INTERVAL 15000
26
#define CHECK_RUNNING_INTERVAL 5000
26
#define CHECK_RUNNING_INTERVAL 5000
27
27
28
namespace Models {
28
namespace Models {
(-)applets/lancelot/libs/lancelot/layouts/CardLayout.cpp (-5 / +37 lines)
Lines 31-36 Link Here
31
    {
31
    {
32
    }
32
    }
33
33
34
    void _hide(QGraphicsWidget * widget) {
35
        // since Qt has some strange bug (or it
36
        // just doesn't behave as it should,
37
        // this is a temporary solution
38
        // so instead of hiding the item,
39
        // we are moving it somewhere
40
        // out of bounds
41
        // this is a very dirty hack!
42
43
        QRectF g = widget->geometry();
44
        if (g.left() < 0) {
45
            return;
46
        }
47
        g.moveRight(- g.left());
48
        widget->setGeometry(g);
49
    }
50
51
    void _show(QGraphicsWidget * widget) {
52
        // see the comment in _hide
53
54
        QRectF g = widget->geometry();
55
        if (g.left() >= 0) {
56
            return;
57
        }
58
59
        g.moveLeft(- g.right());
60
        widget->setGeometry(g);
61
    }
62
34
    void relayout()
63
    void relayout()
35
    {
64
    {
36
        QRectF g = q->geometry();
65
        QRectF g = q->geometry();
Lines 40-48 Link Here
40
        }
69
        }
41
70
42
        foreach (QGraphicsWidget * l, widgets) {
71
        foreach (QGraphicsWidget * l, widgets) {
43
            l->show();
72
            _show(l);
44
            l->setGeometry(g);
73
            l->setGeometry(g);
45
            if (shown != l) l->hide();
74
            if (shown != l) {
75
                _hide(l);
76
            }
46
        }
77
        }
47
    }
78
    }
48
79
Lines 107-112 Link Here
107
    if (widget) {
138
    if (widget) {
108
        d->widgets[id] = widget;
139
        d->widgets[id] = widget;
109
        // widget->hide(); // BUGS in QT
140
        // widget->hide(); // BUGS in QT
141
        d->_hide(widget);
110
    } else {
142
    } else {
111
        d->removeItem(id);
143
        d->removeItem(id);
112
    }
144
    }
Lines 142-158 Link Here
142
    if (!d->widgets.contains(id)) return;
174
    if (!d->widgets.contains(id)) return;
143
    if (d->shown == d->widgets[id]) return;
175
    if (d->shown == d->widgets[id]) return;
144
    if (d->shown) {
176
    if (d->shown) {
145
        d->shown->hide();
177
        d->_hide(d->shown);
146
    }
178
    }
147
    d->shown = d->widgets[id];
179
    d->shown = d->widgets[id];
148
    d->shown->setGeometry(geometry());
180
    d->shown->setGeometry(geometry());
149
    d->shown->show();
181
    d->_show(d->shown);
150
}
182
}
151
183
152
void CardLayout::hideAll()
184
void CardLayout::hideAll()
153
{
185
{
154
    if (!d->shown) return;
186
    if (!d->shown) return;
155
    d->shown->hide();
187
    d->_hide(d->shown);
156
    d->shown = NULL;
188
    d->shown = NULL;
157
}
189
}
158
190
(-)applets/lancelot/libs/lancelot/layouts/FullBorderLayout.cpp (-6 / +5 lines)
Lines 41-50 Link Here
41
    {
41
    {
42
    }
42
    }
43
43
44
    QMap< FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions;
44
    QMap < FullBorderLayout::Place, QGraphicsLayoutItem * > itemPositions;
45
    QMap< FullBorderLayout::Border, qreal > sizes;
45
    QMap < FullBorderLayout::Border, qreal > sizes;
46
46
47
    void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) const
47
    void calculateBorderSizes(qreal & top, qreal & bottom, qreal & left, qreal & right) // const
48
    {
48
    {
49
        // top
49
        // top
50
        top = sizes[FullBorderLayout::TopBorder];
50
        top = sizes[FullBorderLayout::TopBorder];
Lines 121-127 Link Here
121
void FullBorderLayout::setGeometry(const QRectF & rect)
121
void FullBorderLayout::setGeometry(const QRectF & rect)
122
{
122
{
123
    QGraphicsLayout::setGeometry(rect);
123
    QGraphicsLayout::setGeometry(rect);
124
    kDebug() << rect;
124
    // WHATA HELL!?
125
    qDebug() << "FullBorderLayout::setGeometry()";
125
126
126
    QRectF effectiveRect = geometry();
127
    QRectF effectiveRect = geometry();
127
    qreal left = 0, top = 0, right = 0, bottom = 0;
128
    qreal left = 0, top = 0, right = 0, bottom = 0;
Lines 158-164 Link Here
158
    itemRect.setHeight(effectiveRect.height() - topBorder - bottomBorder);
159
    itemRect.setHeight(effectiveRect.height() - topBorder - bottomBorder);
159
160
160
    if (d->itemPositions[Right]) {
161
    if (d->itemPositions[Right]) {
161
        kDebug() << "right" << itemRect;
162
        d->itemPositions[Right]->setGeometry(itemRect);
162
        d->itemPositions[Right]->setGeometry(itemRect);
163
    }
163
    }
164
164
Lines 197-203 Link Here
197
            );
197
            );
198
198
199
    if (d->itemPositions[Center]) {
199
    if (d->itemPositions[Center]) {
200
        kDebug() << "center" << itemRect;
201
        d->itemPositions[Center]->setGeometry(itemRect);
200
        d->itemPositions[Center]->setGeometry(itemRect);
202
    }
201
    }
203
}
202
}
(-)applets/lancelot/libs/lancelot/widgets/CustomListView.cpp (-2 / +2 lines)
Lines 163-171 Link Here
163
            QGraphicsWidget * item = itemForIndex(i);
163
            QGraphicsWidget * item = itemForIndex(i);
164
            QRectF itemGeometry = item->geometry();
164
            QRectF itemGeometry = item->geometry();
165
            if (viewport.intersects(itemGeometry)) {
165
            if (viewport.intersects(itemGeometry)) {
166
                if (q->isVisible()) {
166
                //if (q->isVisible()) {
167
                    item->show();
167
                    item->show();
168
                }
168
                //}
169
                transform.reset();
169
                transform.reset();
170
                if (!viewport.contains(itemGeometry)) {
170
                if (!viewport.contains(itemGeometry)) {
171
                    QRectF clip = viewport.intersect(itemGeometry);
171
                    QRectF clip = viewport.intersect(itemGeometry);
(-)applets/lancelot/libs/lancelot/widgets/ScrollPane.cpp (+2 lines)
Lines 229-236 Link Here
229
229
230
void ScrollPane::setGeometry(const QRectF & rect) //>
230
void ScrollPane::setGeometry(const QRectF & rect) //>
231
{
231
{
232
    QRectF old_geometry = geometry();
232
    Widget::setGeometry(rect);
233
    Widget::setGeometry(rect);
233
234
235
    if (rect == old_geometry) return ;
234
    scrollableWidgetSizeUpdateNeeded();
236
    scrollableWidgetSizeUpdateNeeded();
235
} //<
237
} //<
236
238

Return to bug 258758