Re: [i3] [PATCH 4/5] Alignment fixes for i3bar

  • From: Kevin Murphy <kemurphy.cmu@xxxxxxxxx>
  • To: Michael Stapelberg <michael@xxxxxxxx>
  • Date: Tue, 20 Nov 2012 04:42:41 -0500

Missed the reply-all button :)

On Tue, Nov 20, 2012 at 4:39 AM, Kevin Murphy <kemurphy.cmu@xxxxxxxxx>wrote:

Sure thing. I'll also rebase it without the window title patch below it,
for the time being. :)

Thanks,
Kevin


On Tue, Nov 20, 2012 at 3:30 AM, Michael Stapelberg <michael@xxxxxxxx>wrote:

Hi Kevin,

Kevin Murphy <kemurphy.cmu@xxxxxxxxx> writes:
This patch fixes vertical text alignment between the workspace labels,
window title, and status line, and horizontal spacing between the window
title and status line in i3bar.
Can you amend that in your patch and re-send it please?

@fernandotcl: Can you have a look at the following changes please?

On Sun, Nov 18, 2012 at 5:56 AM, Kevin Murphy <kemurphy.cmu@xxxxxxxxx
wrote:

From: Kevin Murphy <kemurphy@xxxxxxxxxxxxxx>

---
i3bar/src/xcb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c
index c20ff37..983d5ad 100644
--- a/i3bar/src/xcb.c
+++ b/i3bar/src/xcb.c
@@ -130,7 +130,7 @@ void refresh_statusline(void) {
block->width = predict_text_width(block->full_text);
/* If this is not the last block, add some pixels for a
separator. */
if (TAILQ_NEXT(block, blocks) != NULL)
- block->width += 9;
+ block->width += 10;
statusline_width += block->width;
}

@@ -141,7 +141,7 @@ void refresh_statusline(void) {
realloc_sl_buffer();

/* Clear the statusline pixmap. */
- xcb_rectangle_t rect = { 0, 0, root_screen->width_in_pixels,
font.height };
+ xcb_rectangle_t rect = { 0, 0, root_screen->width_in_pixels,
font.height + 4 };
xcb_poly_fill_rectangle(xcb_connection, statusline_pm,
statusline_clear, 1, &rect);

/* Draw the text of each block. */
@@ -1576,7 +1576,7 @@ void draw_bars(bool unhide) {
outputs_walk->buffer,
outputs_walk->bargc,
MAX(0, (int16_t)(statusline_width -
outputs_walk->rect.w + 4)), 0,
- MAX(0, (int16_t)(outputs_walk->rect.w -
statusline_width - traypx - 4)), 3,
+ MAX(0, (int16_t)(outputs_walk->rect.w -
statusline_width - traypx - 4)), 2,
MIN(outputs_walk->rect.w - traypx - 4,
statusline_width), font.height);
}

--
1.8.0



--
Best regards,
Michael



Other related posts: