Re: [dev] [dmenu][patch] Offset problem using -l wih -p with -l

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Sun, 18 Oct 2015 12:04:35 +0200

On Sun, Oct 18, 2015 at 11:40 AM, Claudio <smoppy_AT_gmail.com> wrote:
> Hi dears,
>
> I noticed that vertical listing is done by indenting items at the same level
> as the prompt length, which to me doesn't make any sense. The attached patch
> make it works as I expect.
>
> Is it the intended behaviour or is it indeed a bug?
>

It is intended behaviour. I can see your point, in a vertical list the
first line is always the prompt + input bar so indentation is not
necessarily needed visually.

Note in your patch the width is wrong, w (mw - prompt width) should be
mw (full):

- drw_text(drw, x, y, w, bh, item->text, 0);
+ drw_text(drw, 0, y, w, bh, item->text, 0);

should be:

- drw_text(drw, x, y, w, bh, item->text, 0);
+ drw_text(drw, 0, y, mw, bh, item->text, 0);

I will keep the current behaviour, but feel free to continue the discussion.

Kind regards,
Hiltjo
Received on Sun Oct 18 2015 - 12:04:35 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 18 2015 - 12:12:09 CEST