wl-kbptr icon indicating copy to clipboard operation
wl-kbptr copied to clipboard

Floating mode: minimum rectangle size

Open matejdro opened this issue 10 months ago • 1 comments

Some rectangles seem to be so small in the floating mode that the text does not fit:

Image

Maybe there could be a setting that specified minimum rectangle size? Then all detected rectangles would be grown until they reach that size.

matejdro avatar Apr 29 '25 04:04 matejdro

The text overflowing outside of the areas was done on purpose as if the text is too small, it wouldn't be legible anymore. Now you are right, that's still not ideal having the text overflow also isn't great for legibility because of the added noise and the lack of contrast with the background.

Initially I didn't go for increasing the area size as:

  • It adds some logic when computing the areas, and reasonably that logic would be dependent of the minimum text size. Just setting a minimum text size and have the text overlap is a simpler solution to start with.
  • If it grows but keeps same the center, it doesn't really affect the end result (we're still going to click at the same location). However, if we are at corners, that mean the center will move (unless we don't care about the area being fully shown).
  • It creates (more and somewhat less predictable) overlapping areas.

One alternative solution could also be to have the text highlighted when it overflows (or always).

Honestly, I don't really know what would be the best solution to this issue. That's probably a case of trying different approaches and seeing how it works in practice I guess.

moverest avatar May 04 '25 23:05 moverest