1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Reversed some mouse-gestures for RTL environment.

This commit is contained in:
S. Razi Alavizadeh 2012-09-09 15:01:55 +04:30
parent f4f5ae7083
commit 873a801f74
2 changed files with 40 additions and 4 deletions

View File

@ -135,7 +135,12 @@ void MouseGestures::leftGestured()
return;
}
m_view.data()->back();
if (QApplication::isRightToLeft()) {
m_view.data()->forward();
}
else {
m_view.data()->back();
}
}
void MouseGestures::rightGestured()
@ -144,7 +149,12 @@ void MouseGestures::rightGestured()
return;
}
m_view.data()->forward();
if (QApplication::isRightToLeft()) {
m_view.data()->back();
}
else {
m_view.data()->forward();
}
}
void MouseGestures::downRightGestured()
@ -181,7 +191,12 @@ void MouseGestures::upLeftGestured()
return;
}
view->tabWidget()->previousTab();
if (QApplication::isRightToLeft()) {
view->tabWidget()->nextTab();
}
else {
view->tabWidget()->previousTab();
}
}
void MouseGestures::upRightGestured()
@ -191,7 +206,12 @@ void MouseGestures::upRightGestured()
return;
}
view->tabWidget()->nextTab();
if (QApplication::isRightToLeft()) {
view->tabWidget()->previousTab();
}
else {
view->tabWidget()->nextTab();
}
}
MouseGestures::~MouseGestures()

View File

@ -19,11 +19,27 @@
#include "ui_mousegesturessettingsdialog.h"
#include "licenseviewer.h"
#include <QLabel>
MouseGesturesSettingsDialog::MouseGesturesSettingsDialog(QWidget* parent)
: QDialog(parent)
, ui(new Ui::MouseGesturesSettingsDialog)
{
ui->setupUi(this);
if (QApplication::isRightToLeft()) {
ui->label_5->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/right.gif")));
ui->label_6->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/left.gif")));
ui->label_18->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/up-right.gif")));
ui->label_20->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/up-left.gif")));
}
else {
ui->label_5->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/left.gif")));
ui->label_6->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/right.gif")));
ui->label_18->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/up-left.gif")));
ui->label_20->setPixmap(QPixmap(QString::fromUtf8(":/mousegestures/data/up-right.gif")));
}
setAttribute(Qt::WA_DeleteOnClose);
connect(ui->licenseButton, SIGNAL(clicked()), this, SLOT(showLicense()));