summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-03 22:11:36 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-04 23:57:02 +0300
commit10c8e7da87de2219fad19fd899e97257164e4830 (patch)
tree57ec3359cdd8cbb24b88e4f13a05d210326151ab /src
parent0647852f65598ef9cb9ebff6dfb508e8b1a98c1c (diff)
downloadplus-10c8e7da87de2219fad19fd899e97257164e4830.tar.gz
plus-10c8e7da87de2219fad19fd899e97257164e4830.tar.bz2
plus-10c8e7da87de2219fad19fd899e97257164e4830.tar.xz
plus-10c8e7da87de2219fad19fd899e97257164e4830.zip
Extend background theming.
Diffstat (limited to 'src')
-rw-r--r--src/gui/botcheckerwindow.cpp3
-rw-r--r--src/gui/buydialog.cpp3
-rw-r--r--src/gui/didyouknowwindow.cpp3
-rw-r--r--src/gui/helpwindow.cpp2
-rw-r--r--src/gui/inventorywindow.cpp2
-rw-r--r--src/gui/npcdialog.cpp4
-rw-r--r--src/gui/questswindow.cpp4
-rw-r--r--src/gui/selldialog.cpp3
-rw-r--r--src/gui/serverdialog.cpp3
-rw-r--r--src/gui/setup_colors.cpp5
-rw-r--r--src/gui/setup_input.cpp3
-rw-r--r--src/gui/setup_video.cpp3
-rw-r--r--src/gui/shopwindow.cpp6
-rw-r--r--src/gui/socialwindow.cpp24
-rw-r--r--src/gui/tradewindow.cpp6
-rw-r--r--src/gui/updaterwindow.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp3
-rw-r--r--src/gui/worldselectdialog.cpp3
18 files changed, 51 insertions, 31 deletions
diff --git a/src/gui/botcheckerwindow.cpp b/src/gui/botcheckerwindow.cpp
index 2a811fc3a..7ef349916 100644
--- a/src/gui/botcheckerwindow.cpp
+++ b/src/gui/botcheckerwindow.cpp
@@ -307,7 +307,8 @@ BotCheckerWindow::BotCheckerWindow():
setStickyButtonLock(true);
setDefaultSize(w, h, ImageRect::CENTER);
- playersScrollArea = new ScrollArea(mTable);
+ playersScrollArea = new ScrollArea(mTable,
+ true, "bochecker_background.xml");
mIncButton = new Button(_("Reset"), "reset", this);
playersScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index df64a5a61..da2e6cd7a 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -85,7 +85,8 @@ void BuyDialog::init()
mShopItems = new ShopItems;
mShopItemList = new ShopListBox(mShopItems, mShopItems);
- mScrollArea = new ScrollArea(mShopItemList);
+ mScrollArea = new ScrollArea(mShopItemList,
+ getOptionBool("showBackground"), "buy_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mSlider = new Slider(1.0);
diff --git a/src/gui/didyouknowwindow.cpp b/src/gui/didyouknowwindow.cpp
index dc86c3ce9..4a957da39 100644
--- a/src/gui/didyouknowwindow.cpp
+++ b/src/gui/didyouknowwindow.cpp
@@ -64,7 +64,8 @@ DidYouKnowWindow::DidYouKnowWindow():
mBrowserBox = new BrowserBox;
mBrowserBox->setOpaque(false);
- mScrollArea = new ScrollArea(mBrowserBox);
+ mScrollArea = new ScrollArea(mBrowserBox,
+ true, "didyouknow_background.xml");
Button *okButton = new Button(_("Close"), "close", this);
mButtonPrev = new Button(_("< Previous"), "prev", this);
mButtonNext = new Button(_("Next >"), "next", this);
diff --git a/src/gui/helpwindow.cpp b/src/gui/helpwindow.cpp
index f88394f82..b6a8fcd81 100644
--- a/src/gui/helpwindow.cpp
+++ b/src/gui/helpwindow.cpp
@@ -61,7 +61,7 @@ HelpWindow::HelpWindow():
mBrowserBox = new BrowserBox;
mBrowserBox->setOpaque(false);
- mScrollArea = new ScrollArea(mBrowserBox);
+ mScrollArea = new ScrollArea(mBrowserBox, true, "help_background.xml");
Button *okButton = new Button(_("Close"), "close", this);
mScrollArea->setDimension(gcn::Rectangle(5, 5, 445,
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index b448ef80d..6417a668a 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -136,7 +136,7 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
mItems->addSelectionListener(this);
gcn::ScrollArea *invenScroll = new ScrollArea(
- mItems, getOptionBool("showbackground"));
+ mItems, getOptionBool("showbackground"), "inventory_background.xml");
invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mSlotsLabel = new Label(_("Slots:"));
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 240b53890..3c6262d03 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -101,7 +101,7 @@ NpcDialog::NpcDialog(int npcId) :
mTextBox->setFont(gui->getNpcFont());
mScrollArea = new ScrollArea(mTextBox,
- getOptionBool("showtextbackground"));
+ getOptionBool("showtextbackground"), "npc_textbackground.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mScrollArea->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -120,7 +120,7 @@ NpcDialog::NpcDialog(int npcId) :
setContentSize(260, 175);
mListScrollArea = new ScrollArea(mItemList,
- getOptionBool("showlistbackground"));
+ getOptionBool("showlistbackground"), "npc_listbackground.xml");
mListScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mItemList->setVisible(true);
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index 8969c51e8..ebbb7f615 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -87,11 +87,11 @@ QuestsWindow::QuestsWindow() :
mQuestsModel(new QuestsModel),
mQuestsListBox(new ExtendedListBox(mQuestsModel)),
mQuestScrollArea(new ScrollArea(mQuestsListBox,
- getOptionBool("showlistbackground"))),
+ getOptionBool("showlistbackground"), "quests_list_background.xml")),
mItemLinkHandler(new ItemLinkHandler),
mText(new BrowserBox(BrowserBox::AUTO_WRAP)),
mTextScrollArea(new ScrollArea(mText,
- getOptionBool("showtextbackground"))),
+ getOptionBool("showtextbackground"), "quests_text_background.xml")),
mCloseButton(new Button(_("Close"), "close", this)),
mCompleteIcon(Theme::getImageFromThemeXml("complete_icon.xml", "")),
mIncompleteIcon(Theme::getImageFromThemeXml("incomplete_icon.xml", ""))
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index 931f9daf7..cb4fca993 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -78,7 +78,8 @@ void SellDialog::init()
mShopItems = new ShopItems(true);
mShopItemList = new ShopListBox(mShopItems, mShopItems);
- mScrollArea = new ScrollArea(mShopItemList);
+ mScrollArea = new ScrollArea(mShopItemList, getOptionBool("showbackground"),
+ "sell_background.xml");
mScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mSlider = new Slider(1.0);
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index a0cfda292..0badba504 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -267,7 +267,8 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
mServersList = new ServersListBox(mServersListModel);
mServersList->addMouseListener(this);
- ScrollArea *usedScroll = new ScrollArea(mServersList);
+ ScrollArea *usedScroll = new ScrollArea(mServersList,
+ getOptionBool("showbackground"), "server_background.xml");
usedScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
int n = 0;
diff --git a/src/gui/setup_colors.cpp b/src/gui/setup_colors.cpp
index cbad6f4d9..76ff9badc 100644
--- a/src/gui/setup_colors.cpp
+++ b/src/gui/setup_colors.cpp
@@ -57,7 +57,7 @@ Setup_Colors::Setup_Colors() :
mColorBox = new ListBox(userPalette);
mColorBox->addSelectionListener(this);
- mScroll = new ScrollArea(mColorBox);
+ mScroll = new ScrollArea(mColorBox, true, "setup_colors_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mTextPreview = new TextPreview(rawmsg);
@@ -68,7 +68,8 @@ Setup_Colors::Setup_Colors() :
// don't do anything with links
mPreview->setLinkHandler(nullptr);
- mPreviewBox = new ScrollArea(mPreview);
+ mPreviewBox = new ScrollArea(mPreview, true,
+ "setup_colors_preview_background.xml");
mPreviewBox->setHeight(20);
mPreviewBox->setScrollPolicy(gcn::ScrollArea::SHOW_NEVER,
gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/setup_input.cpp b/src/gui/setup_input.cpp
index c1722b6a5..5049ce962 100644
--- a/src/gui/setup_input.cpp
+++ b/src/gui/setup_input.cpp
@@ -118,7 +118,8 @@ Setup_Input::Setup_Input():
mKeyList->addActionListener(this);
- ScrollArea *scrollArea = new ScrollArea(mKeyList);
+ ScrollArea *scrollArea = new ScrollArea(mKeyList,
+ true, "setup_input_background.xml");
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mAssignKeyButton = new Button(_("Assign"), "assign", this);
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index be2d3de6a..69f769b67 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -249,7 +249,8 @@ Setup_Video::Setup_Video():
{
setName(_("Video"));
- ScrollArea *scrollArea = new ScrollArea(mModeList);
+ ScrollArea *scrollArea = new ScrollArea(mModeList,
+ true, "setup_video_background.xml");
scrollArea->setWidth(150);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index 4daa1c2bb..89a457e88 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -106,9 +106,11 @@ ShopWindow::ShopWindow():
mBuyShopItemList->setPriceCheck(false);
mSellShopItemList->setPriceCheck(false);
- mBuyScrollArea = new ScrollArea(mBuyShopItemList);
+ mBuyScrollArea = new ScrollArea(mBuyShopItemList,
+ getOptionBool("showbuybackground"), "shop_buy_background.xml");
mBuyScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- mSellScrollArea = new ScrollArea(mSellShopItemList);
+ mSellScrollArea = new ScrollArea(mSellShopItemList,
+ getOptionBool("showsellbackground"), "shop_sell_background.xml");
mSellScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mCloseButton = new Button(_("Close"), "close", this);
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp
index 8cf1ee42f..22eb4024d 100644
--- a/src/gui/socialwindow.cpp
+++ b/src/gui/socialwindow.cpp
@@ -148,7 +148,8 @@ public:
setTabColor(&Theme::getThemeColor(Theme::GUILD_SOCIAL_TAB));
mList = new AvatarListBox(guild);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -246,7 +247,8 @@ public:
setTabColor(&Theme::getThemeColor(Theme::GUILD_SOCIAL_TAB));
mList = new AvatarListBox(guild);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -300,7 +302,8 @@ public:
setTabColor(&Theme::getThemeColor(Theme::PARTY_SOCIAL_TAB));
mList = new AvatarListBox(party);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -424,7 +427,8 @@ public:
mBeings(new BeingsListModal())
{
mList = new AvatarListBox(mBeings);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -589,7 +593,8 @@ public:
mBeings(new BeingsListModal())
{
mList = new AvatarListBox(mBeings);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -921,7 +926,8 @@ public:
mBeings(new BeingsListModal())
{
mList = new AvatarListBox(mBeings);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -975,7 +981,8 @@ public:
mBeings(new BeingsListModal())
{
mList = new AvatarListBox(mBeings);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
@@ -1029,7 +1036,8 @@ public:
mBeings(new BeingsListModal())
{
mList = new AvatarListBox(mBeings);
- mScroll = new ScrollArea(mList, showBackground);
+ mScroll = new ScrollArea(mList, showBackground,
+ "social_background.xml");
mScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_AUTO);
mScroll->setVerticalScrollPolicy(gcn::ScrollArea::SHOW_ALWAYS);
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index f37f1d49d..51f3d9e64 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -101,13 +101,15 @@ TradeWindow::TradeWindow():
mMyItemContainer = new ItemContainer(mMyInventory.get());
mMyItemContainer->addSelectionListener(this);
- ScrollArea *myScroll = new ScrollArea(mMyItemContainer);
+ ScrollArea *myScroll = new ScrollArea(mMyItemContainer,
+ true, "trade_background.xml");
myScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mPartnerItemContainer = new ItemContainer(mPartnerInventory.get());
mPartnerItemContainer->addSelectionListener(this);
- ScrollArea *partnerScroll = new ScrollArea(mPartnerItemContainer);
+ ScrollArea *partnerScroll = new ScrollArea(mPartnerItemContainer,
+ true, "trade_background.xml");
partnerScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mMoneyLabel = new Label(strprintf(_("You get %s"), ""));
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index be68518e3..eef8ca306 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -166,7 +166,7 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
setMinHeight(240);
mBrowserBox = new BrowserBox;
- mScrollArea = new ScrollArea(mBrowserBox);
+ mScrollArea = new ScrollArea(mBrowserBox, true, "update_background.xml");
mLabel = new Label(_("Connecting..."));
mProgressBar = new ProgressBar(0.0, 310, 20);
mCancelButton = new Button(_("Cancel"), "cancel", this);
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 7e810390a..d42b60799 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -57,8 +57,7 @@ static std::string const dropdownFiles[2] =
DropDown::DropDown(gcn::ListModel *listModel, gcn::ActionListener* listener,
std::string eventId):
gcn::DropDown::DropDown(listModel,
- new ScrollArea,
- new ListBox(listModel)),
+ new ScrollArea, new ListBox(listModel)),
mShadowColor(Theme::getThemeColor(Theme::DROPDOWN_SHADOW)),
mHighlightColor(Theme::getThemeColor(Theme::HIGHLIGHT))
{
diff --git a/src/gui/worldselectdialog.cpp b/src/gui/worldselectdialog.cpp
index 16253c26e..13f2694b0 100644
--- a/src/gui/worldselectdialog.cpp
+++ b/src/gui/worldselectdialog.cpp
@@ -83,7 +83,8 @@ WorldSelectDialog::WorldSelectDialog(Worlds worlds):
mChangeLoginButton(new Button(_("Change Login"), "login", this)),
mChooseWorld(new Button(_("Choose World"), "world", this))
{
- ScrollArea *worldsScroll = new ScrollArea(mWorldList);
+ ScrollArea *worldsScroll = new ScrollArea(mWorldList,
+ getOptionBool("showbackground"), "world_background.xml");
worldsScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);