mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fully removed card borders when noborder preference set to true for users with custom card art with full borders
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user