From e2dd3cd963461d91de3b593804cfef8524a05812 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 4 Aug 2016 08:55:27 +0200 Subject: [PATCH] Fix Bug 366206 - Left panel of Kontact does not fit properly in left space of Kontact FIXED-IN: 5.3.0 BUG: 366206 --- kontact/src/iconsidepane.cpp | 8 +++++--- kontact/src/sidepanebase.cpp | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kontact/src/iconsidepane.cpp b/kontact/src/iconsidepane.cpp index cb02a84cc7..e5e961c7df 100644 --- a/kontact/src/iconsidepane.cpp +++ b/kontact/src/iconsidepane.cpp @@ -406,7 +406,8 @@ QSize Navigator::sizeHint() const int viewHeight = QListView::sizeHint().height(); - return QSize(maxWidth + rect().width() - contentsRect().width(), viewHeight); + QSize size(maxWidth + rect().width() - contentsRect().width(), viewHeight); + return size; } void Navigator::dragEnterEvent(QDragEnterEvent *event) @@ -554,7 +555,8 @@ void IconSidePane::updatePlugins() void IconSidePane::resizeEvent(QResizeEvent *event) { Q_UNUSED(event); - setMaximumWidth(mNavigator->sizeHint().width()); - setMinimumWidth(mNavigator->sizeHint().width()); + const int newWidth(mNavigator->sizeHint().width()); + setFixedWidth(newWidth); + mNavigator->setFixedWidth(newWidth); } diff --git a/kontact/src/sidepanebase.cpp b/kontact/src/sidepanebase.cpp index 40579a800c..e9b68bd582 100644 --- a/kontact/src/sidepanebase.cpp +++ b/kontact/src/sidepanebase.cpp @@ -29,9 +29,8 @@ using namespace Kontact; SidePaneBase::SidePaneBase(KontactInterface::Core *core, QWidget *parent) : QWidget(parent), mCore(core) { - QVBoxLayout *layout = new QVBoxLayout; + QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); - setLayout(layout); } SidePaneBase::~SidePaneBase() -- GitLab