[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/calligra/2.9] kexi/widget/tableview: Kexi: Fix alignment of table view combo boxes when ro
From: Jaroslaw Staniek <staniek () kde ! org>
Date: 2016-01-08 0:16:25
Message-ID: E1aHKjB-00070R-2U () scm ! kde ! org
[Download RAW message or body]
Git commit c293db532569a80e389f2061f96b719b4448ebdc by Jaroslaw Staniek.
Committed on 08/01/2016 at 00:12.
Pushed by staniek into branch 'calligra/2.9'.
Kexi: Fix alignment of table view combo boxes when rows or columns are scrolled
BUG:357655
FIXED-IN:2.9.11
M +9 -1 kexi/widget/tableview/kexicomboboxbase.cpp
http://commits.kde.org/calligra/c293db532569a80e389f2061f96b719b4448ebdc
diff --git a/kexi/widget/tableview/kexicomboboxbase.cpp \
b/kexi/widget/tableview/kexicomboboxbase.cpp index 87db475..af23739 100644
--- a/kexi/widget/tableview/kexicomboboxbase.cpp
+++ b/kexi/widget/tableview/kexicomboboxbase.cpp
@@ -22,12 +22,14 @@
#include <QStyle>
#include <QWindowsStyle>
#include <QPainter>
+#include <QScrollBar>
#include <kexi_global.h>
#include "kexicomboboxbase.h"
#include <widget/utils/kexicomboboxdropdownbutton.h>
#include "kexicomboboxpopup.h"
#include "KexiTableScrollArea.h"
+#include "KexiTableScrollAreaWidget.h"
#include "kexi.h"
KexiComboBoxBase::KexiComboBoxBase()
@@ -413,8 +415,14 @@ void KexiComboBoxBase::createPopup(bool show)
QPoint posMappedToGlobal = mapFromParentToGlobal(thisWidget->pos());
if (posMappedToGlobal != QPoint(-1, -1)) {
//! todo alter the position to fit the popup within screen boundaries
+ QPoint pos = posMappedToGlobal + QPoint(0, thisWidget->height());
+ if (qobject_cast<KexiTableScrollAreaWidget*>(thisWidget->parentWidget())) {
+ KexiTableScrollArea* tableScroll = \
qobject_cast<KexiTableScrollAreaWidget*>(thisWidget->parentWidget())->scrollArea; + \
pos -= QPoint(tableScroll->horizontalScrollBar()->value(), + \
tableScroll->verticalScrollBar()->value()); + }
popup()->hide();
- popup()->move(posMappedToGlobal + QPoint(0, thisWidget->height()));
+ popup()->move(pos);
//kDebug() << "pos:" << posMappedToGlobal + QPoint(0, thisWidget->height());
//to avoid flickering: first resize to 0-height, then show and resize back \
to prev. height const int w = popupWidthHint();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic