mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (QApplication::isRightToLeft()) {
|
||||||
|
m_view.data()->forward();
|
||||||
|
}
|
||||||
|
else {
|
||||||
m_view.data()->back();
|
m_view.data()->back();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MouseGestures::rightGestured()
|
void MouseGestures::rightGestured()
|
||||||
@ -144,7 +149,12 @@ void MouseGestures::rightGestured()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (QApplication::isRightToLeft()) {
|
||||||
|
m_view.data()->back();
|
||||||
|
}
|
||||||
|
else {
|
||||||
m_view.data()->forward();
|
m_view.data()->forward();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MouseGestures::downRightGestured()
|
void MouseGestures::downRightGestured()
|
||||||
@ -181,7 +191,12 @@ void MouseGestures::upLeftGestured()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (QApplication::isRightToLeft()) {
|
||||||
|
view->tabWidget()->nextTab();
|
||||||
|
}
|
||||||
|
else {
|
||||||
view->tabWidget()->previousTab();
|
view->tabWidget()->previousTab();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MouseGestures::upRightGestured()
|
void MouseGestures::upRightGestured()
|
||||||
@ -191,7 +206,12 @@ void MouseGestures::upRightGestured()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (QApplication::isRightToLeft()) {
|
||||||
|
view->tabWidget()->previousTab();
|
||||||
|
}
|
||||||
|
else {
|
||||||
view->tabWidget()->nextTab();
|
view->tabWidget()->nextTab();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseGestures::~MouseGestures()
|
MouseGestures::~MouseGestures()
|
||||||
|
@ -19,11 +19,27 @@
|
|||||||
#include "ui_mousegesturessettingsdialog.h"
|
#include "ui_mousegesturessettingsdialog.h"
|
||||||
#include "licenseviewer.h"
|
#include "licenseviewer.h"
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
MouseGesturesSettingsDialog::MouseGesturesSettingsDialog(QWidget* parent)
|
MouseGesturesSettingsDialog::MouseGesturesSettingsDialog(QWidget* parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::MouseGesturesSettingsDialog)
|
, ui(new Ui::MouseGesturesSettingsDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
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);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
connect(ui->licenseButton, SIGNAL(clicked()), this, SLOT(showLicense()));
|
connect(ui->licenseButton, SIGNAL(clicked()), this, SLOT(showLicense()));
|
||||||
|
Loading…
Reference in New Issue
Block a user