mirror of
https://git.adityakumar.xyz/betterlockscreen-openrc.git
synced 2024-11-21 22:52:52 +00:00
Fix DPI scaling (#287)
This commit is contained in:
parent
de7bcdc2b5
commit
806866de57
1 changed files with 3 additions and 9 deletions
|
@ -314,14 +314,8 @@ logical_px() {
|
|||
# adjust scaling
|
||||
if [ -n "$dpi" ]; then
|
||||
local scale
|
||||
scale=$(echo "scale=2; $dpi / 96.0" | bc)
|
||||
|
||||
# check if scaling the value is worthy
|
||||
if [ "$(echo "$scale > 1.25" | bc -l)" -eq 0 ]; then
|
||||
echo "$pixels"
|
||||
else
|
||||
scale=$(echo "scale=3; $dpi / 96.0" | bc)
|
||||
echo "$scale * $pixels / 1" | bc
|
||||
fi
|
||||
else
|
||||
# return the default value if no DPI is set
|
||||
echo "$pixels"
|
||||
|
|
Loading…
Reference in a new issue