diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-11 22:21:59 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-11 22:21:59 +0200 |
commit | 8a360e32ac3136494a494379a6dbbacef6f95da2 (patch) | |
tree | d22221d3d666f61642801abc3909144dfa25959f /src | |
parent | 8465e4686ff128a40be4807fce481b16c9b38a8e (diff) |
Round CSS value after applying zoom level
When a 1px value is used for the border, any zoom level that makes it
smaller makes the resulting size 0, so it disappears. Using round
instead leaves more room for zooming out before it disappears.
Fixes: https://github.com/dillo-browser/dillo/issues/240
Diffstat (limited to 'src')
-rw-r--r-- | src/styleengine.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/styleengine.cc b/src/styleengine.cc index 6aa99910..5fe410b6 100644 --- a/src/styleengine.cc +++ b/src/styleengine.cc @@ -791,7 +791,7 @@ void StyleEngine::apply (int i, StyleAttrs *attrs, CssPropertyList *props, bool StyleEngine::computeValue (int *dest, CssLength value, Font *font) { switch (CSS_LENGTH_TYPE (value)) { case CSS_LENGTH_TYPE_PX: - *dest = (int) (CSS_LENGTH_VALUE (value) * zoom); + *dest = roundInt (CSS_LENGTH_VALUE (value) * zoom); return true; case CSS_LENGTH_TYPE_MM: *dest = roundInt (CSS_LENGTH_VALUE (value) * dpmm * zoom); |