Skip to content

Commit

Permalink
fix: sprites for card elements are too small
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Sep 20, 2021
1 parent 34f68cf commit 072c571
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/cmd/library/generate/tasks/item/item_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tera::{Context, Tera};

use crate::cmd::library::generate::config::Config;
use crate::cmd::library::generate::task::{CleanupScope, Task};
use crate::constants::{SPRITES, SPRITE_MD};
use crate::constants::{SPRITES, SPRITE_LG};
use crate::error::Error;
use crate::manifest::element::Shape;
use crate::manifest::item::Item;
Expand Down Expand Up @@ -119,7 +119,7 @@ impl ItemSourceTask {
let sprite_name = item
.icon
.clone()
.map(|i| i.get_sprite_name(&item.urn, SPRITE_MD))
.map(|i| i.get_sprite_name(&item.urn, SPRITE_LG))
.unwrap_or_default();
match element.shape {
Shape::Icon {
Expand Down
16 changes: 8 additions & 8 deletions src/cmd/library/generate/templates/library_bootstrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,25 +116,25 @@ skinparam DefaultFontColor $FONT_COLOR
!local $S="<color:" + $FONT_COLOR + ">" + $sprite + " </color>"
!local $F=""
!if ($techName != "") && ($funcName != "")
!$ST="<color:" + $FONT_COLOR_LIGHT + ">" + $techName + "</color>"
!$T="<color:" + $FONT_COLOR + ">" + $funcName + "</color>"
!$ST="<size:" + $FONT_SIZE_MD + ">" + "<color:" + $FONT_COLOR_LIGHT + ">" + $techName + "</color>" + "</size>"
!$T="<size:" + $FONT_SIZE_MD + ">" + "<color:" + $FONT_COLOR + ">" + $funcName + "</color>" + "</size>"
!$H=$T + "\l" + $S + $ST
!$V=$V + $H
!elseif ($techName != "")
!$ST="<color:" + $FONT_COLOR + ">" + $techName + "</color>"
!$ST="<size:" + $FONT_SIZE_MD + ">" + "<color:" + $FONT_COLOR_LIGHT + ">" + $techName + "</color>" + "</size>"
!$H=$S + $ST
!$V=$V + $H
!elseif ($funcName != "")
!$T=$S + "<color:" + $FONT_COLOR + ">" + $funcName + "</color>"
!$H=$T
!$T="<size:" + $FONT_SIZE_MD + ">" + "<color:" + $FONT_COLOR + ">" + $funcName + "</color>" + "</size>"
!$H=$S + $T
!$V=$V + $H
!endif
!if ($H != "") && ($content != "")
!$F="\l----\l<size:" + $FONT_SIZE_XS + ">" + $content + "</size>"
!$F="\n----\n" + $content
!$V=$V + $F
!elseif ($content != "")
!$F="\l<size:" + $FONT_SIZE_XS + " + $content + "</size>"
!$V=$V + $F
!$F=$content
!$V=$S + "\n" + $F
!endif
Rectangle $id <<$stereotype>> as "$V"
!endprocedure
Expand Down

0 comments on commit 072c571

Please sign in to comment.