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:
parent
f4f5ae7083
commit
873a801f74
@ -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()
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user