summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/layout.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/render/layout.c b/render/layout.c
index 247bdf705..a56e2c4fb 100644
--- a/render/layout.c
+++ b/render/layout.c
@@ -1174,14 +1174,12 @@ bool layout_line(struct box *first, int *width, int *y,
/* calculate box width */
switch (b->style->width.width) {
case CSS_WIDTH_LENGTH:
- b->width = min_gadget_size ? css_screen_dpi *
- option_font_min_size / 720.0 :
+ b->width = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->width.value.
length, b->style);
break;
case CSS_WIDTH_PERCENT:
- b->width = min_gadget_size ? css_screen_dpi *
- option_font_min_size / 720.0 :
+ b->width = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->width.value.
length, b->style);
break;
@@ -1194,8 +1192,7 @@ bool layout_line(struct box *first, int *width, int *y,
/* height */
switch (b->style->height.height) {
case CSS_HEIGHT_LENGTH:
- b->height = min_gadget_size ? css_screen_dpi *
- option_font_min_size / 720.0 :
+ b->height = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->height.length,
b->style);
break;
@@ -1690,8 +1687,7 @@ struct box *layout_minmax_line(struct box *first,
/* calculate box width */
switch (b->style->width.width) {
case CSS_WIDTH_LENGTH:
- width = min_gadget_size ? css_screen_dpi *
- option_font_min_size / 720.0 :
+ width = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->width.value.
length, b->style);
break;
@@ -1709,8 +1705,7 @@ struct box *layout_minmax_line(struct box *first,
/* height */
switch (b->style->height.height) {
case CSS_HEIGHT_LENGTH:
- height = min_gadget_size ? css_screen_dpi *
- option_font_min_size / 720.0 :
+ height = min_gadget_size ? min_gadget_size :
css_len2px(&b->style->height.length,
b->style);
break;