绘制 layout 标志
This commit is contained in:
@@ -136,7 +136,8 @@ static void draw_rect(cairo_t *cr, int32_t x, int32_t y, uint32_t width,
|
||||
}
|
||||
|
||||
void draw_bar(monitor_t *monitor, bool is_current_monitor,
|
||||
color_set_t *color_set, uint32_t height, uint32_t tag_x_padding) {
|
||||
color_set_t *color_set, uint32_t height, uint32_t tag_x_padding,
|
||||
uint32_t layout_x_padding) {
|
||||
cairo_t *cr = monitor->cr;
|
||||
int32_t x = 0;
|
||||
uint32_t width = 0;
|
||||
@@ -166,6 +167,14 @@ void draw_bar(monitor_t *monitor, bool is_current_monitor,
|
||||
draw_text(cr, text, color, x, 0, width, height, true);
|
||||
x += width;
|
||||
}
|
||||
/* 绘制 layout 标识 */
|
||||
{
|
||||
text = monitor->layout->symbol;
|
||||
width = get_text_width(text) + layout_x_padding * 2;
|
||||
color = &color_set->layout_color;
|
||||
draw_text(cr, text, color, x, 0, width, height, true);
|
||||
x += width;
|
||||
}
|
||||
}
|
||||
|
||||
void clean_pango_context(void) {
|
||||
|
||||
Reference in New Issue
Block a user