mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 13:20:59 +00:00 
			
		
		
		
	LibGUI: Highlight interactive area of hovered CheckBox and RadioButton
This is consistent what we do for regular Buttons and gives a pleasant visual cue when you're over a clickable area.
This commit is contained in:
		
							parent
							
								
									d92f62db43
								
							
						
					
					
						commit
						03c91fce74
					
				
				
				Notes:
				
					sideshowbarker
				
				2024-07-19 06:52:34 +09:00 
				
			
			Author: https://github.com/awesomekling
Commit: 03c91fce74
			
					 2 changed files with 9 additions and 0 deletions
				
			
		|  | @ -52,6 +52,12 @@ void RadioButton::paint_event(PaintEvent& event) | |||
|     Painter painter(*this); | ||||
|     painter.add_clip_rect(event.rect()); | ||||
| 
 | ||||
|     if (fill_with_background_color()) | ||||
|         painter.fill_rect(rect(), palette().window()); | ||||
| 
 | ||||
|     if (is_enabled() && is_hovered()) | ||||
|         painter.fill_rect(rect(), palette().hover_highlight()); | ||||
| 
 | ||||
|     Gfx::Rect circle_rect { { 2, 0 }, circle_size() }; | ||||
|     circle_rect.center_vertically_within(rect()); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling