From: Lanius Trolling Date: Wed, 17 Aug 2022 12:23:12 +0000 (-0400) Subject: Change image sizing X-Git-Url: https://gitweb.starshipfights.net/?a=commitdiff_plain;h=aaa4c261eb42ae0f72cf09058b1be41262cfef1b;p=factbooks Change image sizing --- diff --git a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt index 3b98e99..6ada308 100644 --- a/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt +++ b/src/main/kotlin/info/mechyrdia/lore/parser_tags.kt @@ -297,7 +297,7 @@ enum class TextParserFormattingTag(val type: TextParserTagType) { } ?: (null to null) fun getTableSizeAttributes(width: Int?, height: Int?) = (width?.let { " colspan=\"$it\"" } ?: "") + (height?.let { " rowspan=\"$it\"" } ?: "") - fun getImageSizeAttributes(width: Int?, height: Int?) = " style=\"" + (width?.let { "width: ${it * 0.032}vmin;" } ?: "") + (height?.let { "height: ${it * 0.032}vmin;" } ?: "") + "\"" + fun getImageSizeAttributes(width: Int?, height: Int?) = " style=\"" + (width?.let { "width: ${it * 0.025}vmin;" } ?: "") + (height?.let { "height: ${it * 0.025}vmin;" } ?: "") + "\"" } }