scrot icon indicating copy to clipboard operation
scrot copied to clipboard

`scrot --select` and DPI

Open guijan opened this issue 2 years ago • 6 comments
trafficstars

Here's a worst case scenario: you have a smartphone with a 4k screen running PostMarketOS. You take a screenshot with scrot -s and... the selection border is 1 pixel wide. That's microscopic.

The default selection border size should scale with DPI. Currently, the user can manually specify a size, but a program should do its best to have some sensible behavior by default rather than requiring customization to work.

guijan avatar May 04 '23 03:05 guijan

Do you have any formula in mind to calculate what the border size should be?

N-R-K avatar Jun 30 '23 00:06 N-R-K

dpi / 75 + 1 should be fine.

guijan avatar Jun 30 '23 06:06 guijan

Do you know a way to get the DPI from X? I did some quick search on it a while ago and didn't find anything straightforward (though admittedly, I didn't search too much).

If you know how to do it then feel free to open a PR - the formula seems ok to me.

N-R-K avatar Jul 02 '23 16:07 N-R-K

No, sorry. I'm reading instead of programming at the moment.

guijan avatar Jul 05 '23 18:07 guijan