From b6a5beb2c227108b823122e78bcddc9d09ae9fd9 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Thu, 20 Mar 2014 17:44:46 +0400 Subject: [PATCH] Adjust back/forward buttons icon for right-to-left window layout --- mainwindow.cc | 7 +++++++ scanpopup.cc | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/mainwindow.cc b/mainwindow.cc index 72b184aa..d5fa7119 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -805,6 +805,13 @@ MainWindow::MainWindow( Config::Class & cfg_ ): ui.centralWidget->grabGesture( Gestures::GDPinchGestureType ); ui.centralWidget->grabGesture( Gestures::GDSwipeGestureType ); #endif + + if( layoutDirection() == Qt::RightToLeft ) + { + // Adjust button icons for Right-To-Left layout + navBack->setIcon( QIcon( ":/icons/next.png" ) ); + navForward->setIcon( QIcon( ":/icons/previous.png" ) ); + } } void MainWindow::ctrlTabPressed() diff --git a/scanpopup.cc b/scanpopup.cc index a4ea7828..baae09c5 100644 --- a/scanpopup.cc +++ b/scanpopup.cc @@ -57,6 +57,13 @@ ScanPopup::ScanPopup( QWidget * parent, { ui.setupUi( this ); + if( layoutDirection() == Qt::RightToLeft ) + { + // Adjust button icons for Right-To-Left layout + ui.goBackButton->setIcon( QIcon( ":/icons/next.png" ) ); + ui.goForwardButton->setIcon( QIcon( ":/icons/previous.png" ) ); + } + mainStatusBar = new MainStatusBar( this ); ui.queryError->hide();