]> git.sur5r.net Git - i3/i3/commitdiff
Use logical_px() and fix indentation. 2295/head
authorIngo Bürk <ingo.buerk@tngtech.com>
Wed, 13 Apr 2016 17:55:59 +0000 (19:55 +0200)
committerIngo Bürk <ingo.buerk@tngtech.com>
Fri, 15 Apr 2016 16:51:20 +0000 (18:51 +0200)
relates to #2247

src/x.c

diff --git a/src/x.c b/src/x.c
index a6e3bde9e92ae9dce5c6dac29600c4c5cf33f8e5..0fbc4d1c48d8c92d472b50f2545d48819bbeed1a 100644 (file)
--- a/src/x.c
+++ b/src/x.c
@@ -555,8 +555,9 @@ void x_draw_decoration(Con *con) {
 
         draw_util_text(title, &(parent->frame_buffer),
                        p->color->text, p->color->background,
-                       con->deco_rect.x + 2, con->deco_rect.y + text_offset_y,
-                       con->deco_rect.width - 2);
+                       con->deco_rect.x + logical_px(2),
+                       con->deco_rect.y + text_offset_y,
+                       con->deco_rect.width - 2 * logical_px(2));
         I3STRING_FREE(title);
 
         goto after_title;
@@ -617,8 +618,9 @@ void x_draw_decoration(Con *con) {
     i3String *title = con->title_format == NULL ? win->name : con_parse_title_format(con);
     draw_util_text(title, &(parent->frame_buffer),
                    p->color->text, p->color->background,
-                   con->deco_rect.x + logical_px(2) + indent_px, con->deco_rect.y + text_offset_y,
-                   con->deco_rect.width - logical_px(2) - indent_px - mark_width - logical_px(2));
+                   con->deco_rect.x + logical_px(2) + indent_px,
+                   con->deco_rect.y + text_offset_y,
+                   con->deco_rect.width - indent_px - mark_width - 2 * logical_px(2));
     if (con->title_format != NULL)
         I3STRING_FREE(title);