[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeaddons/konq-plugins/searchbar
From: Meni Livne <livne () kde ! org>
Date: 2004-07-16 10:32:17
Message-ID: 20040716103217.2EF3099EB () office ! kde ! org
[Download RAW message or body]
CVS commit by livne:
Correctly calculate position of icon when clicked, similar to the way
it is done in konqueror's konq_combo.cc.
This fixes incorrect behavior of the searchbar in RTL layouts.
M +4 -1 searchbar.cpp 1.20
--- kdeaddons/konq-plugins/searchbar/searchbar.cpp #1.19:1.20
@@ -42,4 +42,5 @@
#include <qpopupmenu.h>
#include <qtimer.h>
+#include <qstyle.h>
#include <qwhatsthis.h>
#include "searchbar.h"
@@ -299,5 +300,7 @@ int SearchBarCombo::findHistoryItem(cons
void SearchBarCombo::mousePressEvent(QMouseEvent *e)
{
- if(e->x() < pixmap(0)->width() + 6)
+ int x0 = QStyle::visualRect( style().querySubControlMetrics( \
QStyle::CC_ComboBox, this, QStyle::SC_ComboBoxEditField ), this ).x(); +
+ if(e->x() > x0 + 2 && e->x() < lineEdit()->x())
{
emit iconClicked();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic