diff --git a/apps/openmw/mwgui/merchantrepair.cpp b/apps/openmw/mwgui/merchantrepair.cpp index c4639d602..f3a3e94ed 100644 --- a/apps/openmw/mwgui/merchantrepair.cpp +++ b/apps/openmw/mwgui/merchantrepair.cpp @@ -21,6 +21,7 @@ namespace MWGui { +const int MerchantRepair::sLineHeight = 18; MerchantRepair::MerchantRepair() : WindowBase("openmw_merchantrepair.layout") @@ -79,16 +80,16 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor) 0, currentY, 0, - 18, + sLineHeight, MyGUI::Align::Default ); - currentY += 18; + currentY += sLineHeight; button->setUserString("Price", MyGUI::utility::toString(price)); button->setUserData(MWWorld::Ptr(*iter)); button->setCaptionWithReplacing(name); - button->setSize(button->getTextSize().width,18); + button->setSize(mList->getWidth(),sLineHeight); button->eventMouseWheel += MyGUI::newDelegate(this, &MerchantRepair::onMouseWheel); button->setUserString("ToolTipType", "ItemPtr"); button->eventMouseButtonClick += MyGUI::newDelegate(this, &MerchantRepair::onRepairButtonClick); diff --git a/apps/openmw/mwgui/merchantrepair.hpp b/apps/openmw/mwgui/merchantrepair.hpp index 231d11089..8dcdfee12 100644 --- a/apps/openmw/mwgui/merchantrepair.hpp +++ b/apps/openmw/mwgui/merchantrepair.hpp @@ -30,6 +30,7 @@ protected: void onRepairButtonClick(MyGUI::Widget* sender); void onOkButtonClick(MyGUI::Widget* sender); + static const int sLineHeight; }; } diff --git a/apps/openmw/mwgui/spellbuyingwindow.cpp b/apps/openmw/mwgui/spellbuyingwindow.cpp index 843731cff..7de4e326e 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.cpp +++ b/apps/openmw/mwgui/spellbuyingwindow.cpp @@ -26,8 +26,6 @@ namespace MWGui , mLastPos(0) , mCurrentY(0) { - setCoord(0, 0, 450, 300); - getWidget(mCancelButton, "CancelButton"); getWidget(mPlayerGold, "PlayerGold"); getWidget(mSpellsView, "SpellsView"); @@ -68,7 +66,7 @@ namespace MWGui toAdd->setUserData(price); toAdd->setCaptionWithReplacing(spell->mName+" - "+MyGUI::utility::toString(price)+"#{sgp}"); - toAdd->setSize(toAdd->getTextSize().width,sLineHeight); + toAdd->setSize(mSpellsView->getWidth(),sLineHeight); toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel); toAdd->setUserString("ToolTipType", "Spell"); toAdd->setUserString("Spell", spellId); diff --git a/apps/openmw/mwgui/travelwindow.cpp b/apps/openmw/mwgui/travelwindow.cpp index 3063b3268..59d139e20 100644 --- a/apps/openmw/mwgui/travelwindow.cpp +++ b/apps/openmw/mwgui/travelwindow.cpp @@ -28,8 +28,6 @@ namespace MWGui WindowBase("openmw_travel_window.layout") , mCurrentY(0) { - setCoord(0, 0, 450, 300); - getWidget(mCancelButton, "CancelButton"); getWidget(mPlayerGold, "PlayerGold"); getWidget(mSelect, "Select"); @@ -96,7 +94,7 @@ namespace MWGui toAdd->setUserString("price",oss.str()); toAdd->setCaptionWithReplacing("#{sCell=" + name + "} - " + MyGUI::utility::toString(price)+"#{sgp}"); - toAdd->setSize(toAdd->getTextSize().width,sLineHeight); + toAdd->setSize(mDestinationsView->getWidth(),sLineHeight); toAdd->eventMouseWheel += MyGUI::newDelegate(this, &TravelWindow::onMouseWheel); toAdd->setUserString("Destination", name); toAdd->setUserData(pos); diff --git a/files/mygui/openmw_alchemy_window.layout b/files/mygui/openmw_alchemy_window.layout index ef8296980..8a1bf1347 100644 --- a/files/mygui/openmw_alchemy_window.layout +++ b/files/mygui/openmw_alchemy_window.layout @@ -6,12 +6,13 @@ - + - + + diff --git a/files/mygui/openmw_enchanting_dialog.layout b/files/mygui/openmw_enchanting_dialog.layout index 88e0ec247..ce9429c67 100644 --- a/files/mygui/openmw_enchanting_dialog.layout +++ b/files/mygui/openmw_enchanting_dialog.layout @@ -1,9 +1,10 @@ - + - + + @@ -23,7 +24,7 @@ - + @@ -35,7 +36,9 @@ - + + + @@ -49,7 +52,7 @@ - + @@ -95,29 +98,29 @@ - + - + - + - - + + - + diff --git a/files/mygui/openmw_merchantrepair.layout b/files/mygui/openmw_merchantrepair.layout index de5d0e316..fc85dc7ae 100644 --- a/files/mygui/openmw_merchantrepair.layout +++ b/files/mygui/openmw_merchantrepair.layout @@ -4,25 +4,25 @@ - + - + - + - + - + diff --git a/files/mygui/openmw_scroll.skin.xml b/files/mygui/openmw_scroll.skin.xml index b0b9dca17..415c2479a 100644 --- a/files/mygui/openmw_scroll.skin.xml +++ b/files/mygui/openmw_scroll.skin.xml @@ -4,12 +4,12 @@ - + - + diff --git a/files/mygui/openmw_spell_buying_window.layout b/files/mygui/openmw_spell_buying_window.layout index 73fb6e869..3481575de 100644 --- a/files/mygui/openmw_spell_buying_window.layout +++ b/files/mygui/openmw_spell_buying_window.layout @@ -1,28 +1,28 @@ - + - + - + - - + + - + - + diff --git a/files/mygui/openmw_travel_window.layout b/files/mygui/openmw_travel_window.layout index 2d6b1324a..7dd9df4eb 100644 --- a/files/mygui/openmw_travel_window.layout +++ b/files/mygui/openmw_travel_window.layout @@ -1,29 +1,29 @@ - + - + - - - + + + - - + + - + - +