enable NavigationBar for non-Windows systems
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									2b0455e2ff
								
							
						
					
					
						commit
						27075778c6
					
				
					 2 changed files with 23 additions and 2 deletions
				
			
		|  | @ -362,6 +362,8 @@ void OptionsDialog::applySettings() | |||
| #if QT_VERSION >= 0x050200 | ||||
|     settings->setValue("NavigationBar", ui->cbSnapmaticNavigationBar->isChecked()); | ||||
| #endif | ||||
| #else | ||||
|     settings->setValue("NavigationBar", ui->cbSnapmaticNavigationBar->isChecked()); | ||||
| #endif | ||||
|     settings->endGroup(); | ||||
| 
 | ||||
|  | @ -722,8 +724,9 @@ void OptionsDialog::setupSnapmaticPictureViewer() | |||
|     ui->gbSnapmaticPictureViewer->setVisible(false); | ||||
| #endif | ||||
| #else | ||||
|     ui->cbSnapmaticNavigationBar->setVisible(false); | ||||
|     ui->gbSnapmaticPictureViewer->setVisible(false); | ||||
|     settings->beginGroup("Interface"); | ||||
|     ui->cbSnapmaticNavigationBar->setChecked(settings->value("NavigationBar", true).toBool()); | ||||
|     settings->endGroup(); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -215,6 +215,15 @@ PictureDialog::~PictureDialog() | |||
|         delete layout()->menuBar(); | ||||
|     } | ||||
| #endif | ||||
| #else | ||||
|     if (naviEnabled) | ||||
|     { | ||||
|         for (QObject *obj : layout()->menuBar()->children()) | ||||
|         { | ||||
|             delete obj; | ||||
|         } | ||||
|         delete layout()->menuBar(); | ||||
|     } | ||||
| #endif | ||||
|     for (QObject *obj : manageMenu->children()) | ||||
|     { | ||||
|  | @ -247,6 +256,15 @@ void PictureDialog::addPreviousNextButtons() | |||
| 
 | ||||
|     naviEnabled = true; | ||||
| #endif | ||||
| #else | ||||
|     QToolBar *uiToolbar = new QToolBar("Picture Toolbar", this); | ||||
|     uiToolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); | ||||
|     uiToolbar->setObjectName("uiToolbar"); | ||||
|     uiToolbar->addAction(QIcon(":/img/back.svgz"), "", this, SLOT(previousPictureRequestedSlot())); | ||||
|     uiToolbar->addAction(QIcon(":/img/next.svgz"), "", this, SLOT(nextPictureRequestedSlot())); | ||||
|     layout()->setMenuBar(uiToolbar); | ||||
| 
 | ||||
|     naviEnabled = true; | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue