Adjust back/forward buttons icon for right-to-left window layout

This commit is contained in:
Abs62 2014-03-20 17:44:46 +04:00
parent d22c08d8cd
commit b6a5beb2c2
2 changed files with 14 additions and 0 deletions

View file

@ -805,6 +805,13 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
ui.centralWidget->grabGesture( Gestures::GDPinchGestureType ); ui.centralWidget->grabGesture( Gestures::GDPinchGestureType );
ui.centralWidget->grabGesture( Gestures::GDSwipeGestureType ); ui.centralWidget->grabGesture( Gestures::GDSwipeGestureType );
#endif #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() void MainWindow::ctrlTabPressed()

View file

@ -57,6 +57,13 @@ ScanPopup::ScanPopup( QWidget * parent,
{ {
ui.setupUi( this ); 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 ); mainStatusBar = new MainStatusBar( this );
ui.queryError->hide(); ui.queryError->hide();