separator
This commit is contained in:
		
							parent
							
								
									ec2c23a652
								
							
						
					
					
						commit
						d1fa0faefc
					
				
							
								
								
									
										18
									
								
								x.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								x.c
									
									
									
									
									
								
							| @ -155,14 +155,18 @@ void x_win_draw(void) | ||||
|                 width = MAX(w, width); | ||||
|         } | ||||
| 
 | ||||
|         printf("(%d,%d)\n", width, height); | ||||
|         height += (g_slist_length(layouts) - 1) * settings.separator_height; | ||||
| 
 | ||||
|         printf("(%d,%d)[%d]\n", width, height, settings.separator_height); | ||||
| 
 | ||||
|         XResizeWindow(xctx.dc->dpy, xctx.win, width, height); | ||||
| 
 | ||||
|         cairo_rectangle(c, 0.0, 0.0, width, height); | ||||
|         /* FIXME frame color */ | ||||
|         cairo_set_source_rgb(c, 0.2, 0.2, 0.2); | ||||
|         cairo_fill(c); | ||||
| 
 | ||||
|         /* FIXME text color */ | ||||
|         cairo_set_source_rgb(c, 0.8, 0.8, 0.8); | ||||
|         cairo_move_to(c, 0, 0); | ||||
| 
 | ||||
| @ -171,11 +175,23 @@ void x_win_draw(void) | ||||
|         for (GSList *iter = layouts; iter; iter = iter->next) { | ||||
|                 PangoLayout *l = iter->data; | ||||
|                 cairo_move_to(c, 0, y); | ||||
|                 /* FIXME text color */ | ||||
|                 cairo_set_source_rgb(c, 0.8, 0.8, 0.8); | ||||
|                 pango_cairo_update_layout(c, l); | ||||
|                 pango_cairo_show_layout(c, l); | ||||
|                 int h; | ||||
|                 pango_layout_get_pixel_size(l, NULL, &h); | ||||
|                 y += h; | ||||
|                 if (settings.separator_height > 0 && iter->next) { | ||||
|                         cairo_move_to(c, 0, y + settings.separator_height / 2); | ||||
|                         /* FIXME sep_color */ | ||||
|                         cairo_set_source_rgb(c, 0.8, 0.0, 0.0); | ||||
|                         cairo_set_line_width(c, settings.separator_height); | ||||
|                         cairo_line_to(c, width, y); | ||||
|                         y += settings.separator_height; | ||||
|                         cairo_stroke(c); | ||||
|                 } | ||||
|                 cairo_move_to(c, 0, y); | ||||
|         } | ||||
| 
 | ||||
|         cairo_show_page(c); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sascha Kruse
						Sascha Kruse