mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:52:45 +00:00 
			
		
		
		
	PDFViewer: Don't change pages on horizontal scroll
This was a bit jarring, and didn't align with the behavior of other PDF renderers.
This commit is contained in:
		
							parent
							
								
									b2f79a74d4
								
							
						
					
					
						commit
						c39718ca81
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -126,7 +126,7 @@ void PDFViewer::mousewheel_event(GUI::MouseEvent& event) | |||
| 
 | ||||
|         if (scrolled_down) { | ||||
|             if (scrollbar.value() == scrollbar.max()) { | ||||
|                 if (m_current_page_index < m_document->get_page_count() - 1) { | ||||
|                 if (m_current_page_index < m_document->get_page_count() - 1 && !event.shift()) { | ||||
|                     m_current_page_index++; | ||||
|                     if (on_page_change) | ||||
|                         on_page_change(m_current_page_index); | ||||
|  | @ -137,7 +137,7 @@ void PDFViewer::mousewheel_event(GUI::MouseEvent& event) | |||
|             } | ||||
|         } else { | ||||
|             if (scrollbar.value() == 0) { | ||||
|                 if (m_current_page_index > 0) { | ||||
|                 if (m_current_page_index > 0 && !event.shift()) { | ||||
|                     m_current_page_index--; | ||||
|                     if (on_page_change) | ||||
|                         on_page_change(m_current_page_index); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Matthew Olsson
						Matthew Olsson