Merge branch 'fix_layout_alignment' of git://github.com/wavexx/dunst into pull_requests
This commit is contained in:
		
						commit
						ff4d56e826
					
				
							
								
								
									
										15
									
								
								x.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								x.c
									
									
									
									
									
								
							| @ -160,6 +160,17 @@ static void r_setup_pango_layout(PangoLayout *layout, int width) | |||||||
| 
 | 
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | static void r_update_layouts_width(GSList *layouts, int width) | ||||||
|  | { | ||||||
|  |         width -= 2 * settings.h_padding; | ||||||
|  |         width -= 2 * settings.frame_width; | ||||||
|  | 
 | ||||||
|  |         for (GSList *iter = layouts; iter; iter = iter->next) { | ||||||
|  |                 colored_layout *cl = iter->data; | ||||||
|  |                 pango_layout_set_width(cl->l, width * PANGO_SCALE); | ||||||
|  |         } | ||||||
|  | } | ||||||
|  | 
 | ||||||
| static void free_colored_layout(void *data) | static void free_colored_layout(void *data) | ||||||
| { | { | ||||||
|         colored_layout *cl = data; |         colored_layout *cl = data; | ||||||
| @ -409,6 +420,10 @@ void x_win_draw(void) | |||||||
|         int width = dim.w; |         int width = dim.w; | ||||||
|         int height = dim.h; |         int height = dim.h; | ||||||
| 
 | 
 | ||||||
|  | 	if ((have_dynamic_width() || settings.shrink) && settings.align != left) { | ||||||
|  |                 r_update_layouts_width(layouts, width); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         cairo_t *c; |         cairo_t *c; | ||||||
|         cairo_surface_t *image_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); |         cairo_surface_t *image_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); | ||||||
|         c = cairo_create(image_surface); |         c = cairo_create(image_surface); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse