Fully removed card borders when noborder preference set to true for users with custom card art with full borders

This commit is contained in:
austinio7116
2017-06-09 21:27:59 +00:00
parent 362fe5a693
commit 8e4ddea21f
2 changed files with 2 additions and 2 deletions

View File

@@ -1107,7 +1107,7 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
(itemInfo.item instanceof IPaperCard && CardView.getCardForUi((IPaperCard)itemInfo.item). (itemInfo.item instanceof IPaperCard && CardView.getCardForUi((IPaperCard)itemInfo.item).
getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH")); getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH"));
final int borderSize = noBorder? 2 : Math.round(itemWidth * CardPanel.BLACK_BORDER_SIZE); final int borderSize = noBorder? 0 : Math.round(itemWidth * CardPanel.BLACK_BORDER_SIZE);
final int cornerSize = Math.max(4, Math.round(itemWidth * CardPanel.ROUNDED_CORNER_SIZE)); final int cornerSize = Math.max(4, Math.round(itemWidth * CardPanel.ROUNDED_CORNER_SIZE));
if (itemInfo.selected || itemInfo == hoveredItem) { if (itemInfo.selected || itemInfo == hoveredItem) {

View File

@@ -309,7 +309,7 @@ public class CardPanel extends SkinnedPanel implements CardContainer, IDisposabl
// Determine whether to render border from properties // Determine whether to render border from properties
boolean noBorder = !isPreferenceEnabled(FPref.UI_RENDER_BLACK_BORDERS) || getCard().getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH"); boolean noBorder = !isPreferenceEnabled(FPref.UI_RENDER_BLACK_BORDERS) || getCard().getCurrentState().getSetCode().equalsIgnoreCase("MPS_AKH");
final int borderSize = noBorder ? 2 : Math.round(cardWidth * CardPanel.BLACK_BORDER_SIZE); final int borderSize = noBorder ? 0 : Math.round(cardWidth * CardPanel.BLACK_BORDER_SIZE);
final Point imgPos = new Point(cardXOffset + borderSize, cardYOffset + borderSize); final Point imgPos = new Point(cardXOffset + borderSize, cardYOffset + borderSize);
final Dimension imgSize = new Dimension(cardWidth - (borderSize * 2), cardHeight - (borderSize * 2)); final Dimension imgSize = new Dimension(cardWidth - (borderSize * 2), cardHeight - (borderSize * 2));