summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/button.cpp6
-rw-r--r--src/gui/buy.cpp4
-rw-r--r--src/gui/item_amount.cpp4
-rw-r--r--src/gui/npcintegerdialog.cpp4
-rw-r--r--src/gui/sell.cpp4
5 files changed, 12 insertions, 10 deletions
diff --git a/src/gui/button.cpp b/src/gui/button.cpp
index 1b206161..16a2853c 100644
--- a/src/gui/button.cpp
+++ b/src/gui/button.cpp
@@ -95,8 +95,10 @@ void Button::init()
{
btn[mode] = resman->getImage(data[mode].file);
a = 0;
- for (y = 0; y < 3; y++) {
- for (x = 0; x < 3; x++) {
+ for (y = 0; y < 3; y++)
+ {
+ for (x = 0; x < 3; x++)
+ {
button[mode].grid[a] = btn[mode]->getSubImage(
data[x].gridX, data[y].gridY,
data[x + 1].gridX - data[x].gridX + 1,
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp
index c2c8cfed..a0944086 100644
--- a/src/gui/buy.cpp
+++ b/src/gui/buy.cpp
@@ -70,8 +70,8 @@ BuyDialog::BuyDialog(Network *network):
mItemDescLabel = new Label(strprintf(_("Description: %s"), ""));
mItemEffectLabel = new Label(strprintf(_("Effect: %s"), ""));
- mIncreaseButton->setSize(gui->getFontHeight(), gui->getFontHeight());
- mDecreaseButton->setSize(gui->getFontHeight(), gui->getFontHeight());
+ mDecreaseButton->adjustSize();
+ mDecreaseButton->setWidth(mIncreaseButton->getWidth());
mIncreaseButton->setEnabled(false);
mDecreaseButton->setEnabled(false);
diff --git a/src/gui/item_amount.cpp b/src/gui/item_amount.cpp
index 5a7cf18f..41122229 100644
--- a/src/gui/item_amount.cpp
+++ b/src/gui/item_amount.cpp
@@ -62,8 +62,8 @@ ItemAmountWindow::ItemAmountWindow(int usage, Window *parent, Item *item):
Button *cancelButton = new Button(_("Cancel"), "Cancel", this);
Button *addAllButton = new Button(_("All"), "All", this);
- minusButton->setSize(gui->getFontHeight(), gui->getFontHeight());
- plusButton->setSize(gui->getFontHeight(), gui->getFontHeight());
+ minusButton->adjustSize();
+ minusButton->setWidth(plusButton->getWidth());
// Set positions
ContainerPlacer place;
diff --git a/src/gui/npcintegerdialog.cpp b/src/gui/npcintegerdialog.cpp
index 5332d196..b4498b31 100644
--- a/src/gui/npcintegerdialog.cpp
+++ b/src/gui/npcintegerdialog.cpp
@@ -48,8 +48,8 @@ NpcIntegerDialog::NpcIntegerDialog(Network *network):
cancelButton = new Button(_("Cancel"), "cancel", this);
resetButton = new Button(_("Reset"), "reset", this);
- mIncButton->setSize(gui->getFontHeight(), gui->getFontHeight());
- mDecButton->setSize(gui->getFontHeight(), gui->getFontHeight());
+ mDecButton->adjustSize();
+ mDecButton->setWidth(mIncButton->getWidth());
ContainerPlacer place;
place = getPlacer(0, 0);
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 47e44ffe..4b58d075 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -73,8 +73,8 @@ SellDialog::SellDialog(Network *network):
mItemDescLabel = new Label(strprintf(_("Description: %s"), ""));
mItemEffectLabel = new Label(strprintf(_("Effect: %s"), ""));
- mIncreaseButton->setSize(gui->getFontHeight(), gui->getFontHeight());
- mDecreaseButton->setSize(gui->getFontHeight(), gui->getFontHeight());
+ mDecreaseButton->adjustSize();
+ mDecreaseButton->setWidth(mIncreaseButton->getWidth());
mIncreaseButton->setEnabled(false);
mDecreaseButton->setEnabled(false);