mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add two new style parameters, width and pad, which apply to scrollbars.
From Michael Grant, GitHub issue 4241.
This commit is contained in:
		
							
								
								
									
										10
									
								
								window.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								window.c
									
									
									
									
									
								
							@@ -596,9 +596,10 @@ window_get_active_at(struct window *w, u_int x, u_int y)
 | 
			
		||||
 | 
			
		||||
		if (pane_scrollbars == PANE_SCROLLBARS_ALWAYS ||
 | 
			
		||||
		    (pane_scrollbars == PANE_SCROLLBARS_MODAL &&
 | 
			
		||||
		     window_pane_mode(wp) != WINDOW_PANE_NO_MODE))
 | 
			
		||||
			sb_w = PANE_SCROLLBARS_WIDTH;
 | 
			
		||||
		else
 | 
			
		||||
		     window_pane_mode(wp) != WINDOW_PANE_NO_MODE)) {
 | 
			
		||||
			sb_w = wp->scrollbar_style.width +
 | 
			
		||||
			    wp->scrollbar_style.pad;
 | 
			
		||||
		} else
 | 
			
		||||
			sb_w = 0;
 | 
			
		||||
 | 
			
		||||
		if (sb_pos == PANE_SCROLLBARS_LEFT) {
 | 
			
		||||
@@ -961,6 +962,9 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
 | 
			
		||||
	wp->control_bg = -1;
 | 
			
		||||
	wp->control_fg = -1;
 | 
			
		||||
 | 
			
		||||
	style_set_scrollbar_style_from_option(&wp->scrollbar_style,
 | 
			
		||||
	    wp->options);
 | 
			
		||||
 | 
			
		||||
	colour_palette_init(&wp->palette);
 | 
			
		||||
	colour_palette_from_option(&wp->palette, wp->options);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user