make default resolution 312x445 as that is the resolution of card images download from magiccards.info, option 'Show original images' will display the original resolution of the image

master
melvin 2011-05-27 12:56:29 +08:00
parent a34dbde072
commit 3ea9c18667
4 changed files with 11 additions and 7 deletions

View File

@ -9,11 +9,12 @@ import magic.model.MagicCardDefinition;
public interface CardImagesProvider {
public static final String IMAGE_EXTENSION=".jpg";
public static final int CARD_WIDTH=203;
public static final int CARD_HEIGHT=289;
public static final int CARD_WIDTH=312;
public static final int CARD_HEIGHT=445;
public BufferedImage getImage(
final MagicCardDefinition cardDefinition,
final int index,
final boolean high);
}

View File

@ -52,7 +52,7 @@ public class GeneralConfig {
private static final int DEFAULT_POPUP_DELAY=300;
private static final int DEFAULT_STRENGTH_DIFFICULTY=2;
private static final int DEFAULT_STRENGTH_GAMES=123;
private static final boolean DEFAULT_HIGH_QUALITY=true;
private static final boolean DEFAULT_HIGH_QUALITY=false;
private static final boolean DEFAULT_SOUND=false;
private int left=DEFAULT_LEFT;
@ -348,4 +348,4 @@ public class GeneralConfig {
return INSTANCE;
}
}
}

View File

@ -108,7 +108,7 @@ public class PreferencesDialog extends JDialog implements ActionListener {
soundCheckBox.setFocusable(false);
mainPanel.add(soundCheckBox);
highQualityCheckBox=new JCheckBox("High quality card popup images",config.isHighQuality());
highQualityCheckBox=new JCheckBox("Show card images in original size",config.isHighQuality());
highQualityCheckBox.setBounds(25,165,350,20);
highQualityCheckBox.setFocusable(false);
mainPanel.add(highQualityCheckBox);
@ -162,4 +162,4 @@ public class PreferencesDialog extends JDialog implements ActionListener {
dispose();
}
}
}
}

View File

@ -16,6 +16,9 @@ import magic.ui.widget.FontsAndBorders;
import magic.ui.widget.TitleBar;
import magic.ui.widget.TransparentImagePanel;
/**
* Class responsible for showing the card pic popup
*/
public class CardViewer extends JPanel implements DelayedViewer {
private static final long serialVersionUID = 1L;
@ -91,4 +94,4 @@ public class CardViewer extends JPanel implements DelayedViewer {
setVisible(false);
}
}
}