From 729a3d64b1666907108de35e2a7de8d1ca8d679f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guszt=C3=A1v=20Szikszai?= Date: Mon, 26 Apr 2021 06:59:19 +0200 Subject: [PATCH] Added fullHeight property to Ui.Image. --- source/Image.mint | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/Image.mint b/source/Image.mint index 7e01d5e..3a4aa6c 100644 --- a/source/Image.mint +++ b/source/Image.mint @@ -14,6 +14,9 @@ component Ui.Image { /* Whether or not the image should have a background color. */ property transparent : Bool = false + /* Whether or not the image fills the height of it's parent element. */ + property fullHeight : Bool = false + /* Whether or not the image fills the width of it's parent element. */ property fullWidth : Bool = false @@ -74,12 +77,16 @@ component Ui.Image { /* The style for the base. */ style base { - height: #{Ui.Size.toString(height)}; - if (!transparent) { background: var(--content-faded-color); } + if (fullHeight) { + height: 100%; + } else { + height: #{Ui.Size.toString(height)}; + } + if (fullWidth) { width: 100%; } else {