Add a little horizontal padding around bazaar icons

This commit is contained in:
drdev
2014-07-18 02:40:02 +00:00
parent b16a72954d
commit 32c01adb19

View File

@@ -168,8 +168,8 @@ public class QuestBazaarScreen extends TabPageScreen<QuestBazaarScreen> {
@Override @Override
public void drawBackground(Graphics g) { public void drawBackground(Graphics g) {
if (icon != null) { if (icon != null) {
float iconSize = btnBuy.getHeight(); float iconWidth = btnBuy.getWidth();
g.drawImage(icon, 0, BazaarPage.PADDING, iconSize, iconSize); g.drawImage(icon, BazaarPage.PADDING / 2, BazaarPage.PADDING, iconWidth, iconWidth * icon.getHeight() / icon.getWidth());
} }
//draw bottom border //draw bottom border
@@ -199,7 +199,7 @@ public class QuestBazaarScreen extends TabPageScreen<QuestBazaarScreen> {
lblCost.setBounds(x, y, buttonSize, lblCost.getHeight()); lblCost.setBounds(x, y, buttonSize, lblCost.getHeight());
float w = x - buttonSize - padding; float w = x - buttonSize - padding;
x = buttonSize; x = buttonSize + padding;
y = padding; y = padding;
lblName.setBounds(x, y, w, lblName.getAutoSizeBounds().height); lblName.setBounds(x, y, w, lblName.getAutoSizeBounds().height);
y += lblName.getHeight() + padding; y += lblName.getHeight() + padding;