mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 10:42:45 +00:00 
			
		
		
		
	WindowServer: Add window icons. Every window has the same icon for now.
The icons show up both in the title bars and in the window switcher. Eventually I'd like to be able to minimize to icon, and maybe even have myself a taskbar.
This commit is contained in:
		
							parent
							
								
									3729f7cc6a
								
							
						
					
					
						commit
						67ee579113
					
				
					 5 changed files with 34 additions and 5 deletions
				
			
		|  | @ -80,8 +80,9 @@ void WSWindowSwitcher::draw() | |||
|             text_color = Color::Black; | ||||
|             rect_text_color = Color::DarkGray; | ||||
|         } | ||||
|         painter.blit(item_rect.location().translated(0, (item_rect.height() - window.icon().height()) / 2), window.icon(), window.icon().rect()); | ||||
|         painter.set_font(Font::default_bold_font()); | ||||
|         painter.draw_text(item_rect, window.title(), TextAlignment::CenterLeft, text_color); | ||||
|         painter.draw_text(item_rect.translated(window.icon().width() + 4, 0), window.title(), TextAlignment::CenterLeft, text_color); | ||||
|         painter.set_font(WSWindowManager::the().font()); | ||||
|         painter.draw_text(item_rect, window.rect().to_string(), TextAlignment::CenterRight, rect_text_color); | ||||
|     } | ||||
|  | @ -118,7 +119,6 @@ void WSWindowSwitcher::refresh() | |||
|     draw(); | ||||
| } | ||||
| 
 | ||||
| void WSWindowSwitcher::on_message(WSMessage& message) | ||||
| void WSWindowSwitcher::on_message(WSMessage&) | ||||
| { | ||||
| 
 | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling