Tomas-M / xlunch

Graphical app launcher for X with minimal dependencies
http://xlunch.org
GNU General Public License v3.0
219 stars 37 forks source link

Using --textafter #50

Closed Tomas-M closed 6 years ago

Tomas-M commented 6 years ago

When using --textafter, there is a mouse cursor position between items which highlights two items at the same time. I assume this is a bug which should be fixed.

PMunch commented 6 years ago

Using what command on which screen resolution? When I just use --textafter 20 it displays fine, but if I force up the amount of rows with --textafter 20 --rows 10 I get some overlap between items since it doesn't actually have space for 10 rows within the borders. Either using the default or manually setting it to something <10 makes it work fine again.

A screenshot would be helpful as well. Here I've attached some displaying what I think you're seeing: noverlap This is with no overlap, the mouse cursor is placed in the bottom of the selected application. xlunch --textafter 20 --columns 2 --rows 9

overlap Here we can see the rows overlapping, caused by too many rows. xlunch --textafter 20 --columns 2 --rows 10

Tomas-M commented 6 years ago

-n --desktop --dontquit -b 40 --textafter 20 screen resolution 1024x768 three icons (from make test) You must position the cursor right between the items, there is only one pixel boundary where this happens...

screen

PMunch commented 6 years ago

Ah, since you only have those three icons it's probably something in the calculation of sizes. It probably rounds down or up were it shouldn't making a 1px overlap. I'll fix it tomorrow, shouldn't be too hard.

Tomas-M commented 6 years ago

Maybe this is related to the margin calculation as well?

Tomas-M commented 6 years ago

It seems to me the textafter got broken after the last changes.

PMunch commented 6 years ago

Ah, I had replaced one too many variable. Fixed it now.

PMunch commented 6 years ago

Fixed in https://github.com/Tomas-M/xlunch/commit/7f928d1e259b69beace40bc297f6b734a3fe2cae. This is actually something that has been a bug all along, it's just the new system of showing as many icons as possible that makes it apparent. You should be able to provoke it in earlier version by setting margin to 0 or similar.