mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	deco: refactor button code
- Make the height+width of buttons the same as the title bar. - Center icons within the 'button space' - Show button background color on hover (just hard-coded grey for now)
This commit is contained in:
		
							parent
							
								
									3c90cb7945
								
							
						
					
					
						commit
						4ecc5efa73
					
				
					 3 changed files with 56 additions and 21 deletions
				
			
		| 
						 | 
				
			
			@ -90,9 +90,7 @@ static void process_cursor_motion(struct server *server, uint32_t time)
 | 
			
		|||
 | 
			
		||||
	/* TODO: Could we use wlr_xcursor_get_resize_name() here?? */
 | 
			
		||||
	switch (view_area) {
 | 
			
		||||
	case LAB_DECO_PART_TITLE:
 | 
			
		||||
		wlr_xcursor_manager_set_cursor_image(
 | 
			
		||||
			server->cursor_mgr, XCURSOR_DEFAULT, server->cursor);
 | 
			
		||||
	case LAB_DECO_NONE:
 | 
			
		||||
		break;
 | 
			
		||||
	case LAB_DECO_PART_TOP:
 | 
			
		||||
		wlr_xcursor_manager_set_cursor_image(
 | 
			
		||||
| 
						 | 
				
			
			@ -110,6 +108,10 @@ static void process_cursor_motion(struct server *server, uint32_t time)
 | 
			
		|||
		wlr_xcursor_manager_set_cursor_image(
 | 
			
		||||
			server->cursor_mgr, "left_side", server->cursor);
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		wlr_xcursor_manager_set_cursor_image(
 | 
			
		||||
			server->cursor_mgr, XCURSOR_DEFAULT, server->cursor);
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
	if (surface) {
 | 
			
		||||
		bool focus_changed = seat->pointer_state.focused_surface !=
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue