mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:32:45 +00:00 
			
		
		
		
	WindowServer: Don't add maximize button to non-resizable windows.
The minimize button can stay though, since it doesn't change the window size, just the visibility. :^)
This commit is contained in:
		
							parent
							
								
									8c4b7fe385
								
							
						
					
					
						commit
						42cf09fdf1
					
				
					 4 changed files with 10 additions and 16 deletions
				
			
		|  | @ -94,10 +94,12 @@ WSWindowFrame::WSWindowFrame(WSWindow& window) | |||
|         m_window.event(close_request); | ||||
|     })); | ||||
| 
 | ||||
|     m_buttons.append(make<WSButton>(*this, *s_maximize_button_bitmap, [this] (auto& button) { | ||||
|         m_window.set_maximized(!m_window.is_maximized()); | ||||
|         button.set_bitmap(m_window.is_maximized() ? *s_unmaximize_button_bitmap : *s_maximize_button_bitmap); | ||||
|     })); | ||||
|     if (window.is_resizable()) { | ||||
|         m_buttons.append(make<WSButton>(*this, *s_maximize_button_bitmap, [this] (auto& button) { | ||||
|             m_window.set_maximized(!m_window.is_maximized()); | ||||
|             button.set_bitmap(m_window.is_maximized() ? *s_unmaximize_button_bitmap : *s_maximize_button_bitmap); | ||||
|         })); | ||||
|     } | ||||
| 
 | ||||
|     m_buttons.append(make<WSButton>(*this, *s_minimize_button_bitmap, [this] (auto&) { | ||||
|         m_window.set_minimized(true); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling