From 8cc6679b676103c7c6696947ea43ad439e9754c5 Mon Sep 17 00:00:00 2001
From: Andrei Karas <akaras@inbox.ru>
Date: Tue, 31 Jul 2012 00:29:22 +0300
Subject: Add theme option to show hide opaque background for some windows.

---
 data/graphics/gui/CMakeLists.txt           |  2 ++
 data/graphics/gui/Makefile.am              |  2 ++
 data/graphics/gui/inventory.xml            | 23 +++++++++++++++++++++++
 data/graphics/gui/playerbox_background.xml |  1 +
 data/graphics/gui/quests.xml               | 25 +++++++++++++++++++++++++
 data/themes/enchilado/CMakeLists.txt       |  2 ++
 data/themes/enchilado/Makefile.am          |  2 ++
 data/themes/enchilado/inventory.xml        | 24 ++++++++++++++++++++++++
 data/themes/enchilado/quests.xml           | 24 ++++++++++++++++++++++++
 data/themes/pink/CMakeLists.txt            |  2 ++
 data/themes/pink/Makefile.am               |  2 ++
 data/themes/pink/inventory.xml             | 24 ++++++++++++++++++++++++
 data/themes/pink/quests.xml                | 25 +++++++++++++++++++++++++
 data/themes/unity/CMakeLists.txt           |  2 ++
 data/themes/unity/Makefile.am              |  2 ++
 data/themes/unity/inventory.xml            | 25 +++++++++++++++++++++++++
 data/themes/unity/quests.xml               | 25 +++++++++++++++++++++++++
 data/themes/wood/CMakeLists.txt            |  2 ++
 data/themes/wood/Makefile.am               |  2 ++
 data/themes/wood/inventory.xml             | 24 ++++++++++++++++++++++++
 data/themes/wood/quests.xml                | 25 +++++++++++++++++++++++++
 src/gui/inventorywindow.cpp                |  3 ++-
 src/gui/questswindow.cpp                   |  8 +++++---
 src/gui/widgets/playerbox.cpp              | 29 +++++++++++++++++++++--------
 src/gui/widgets/playerbox.h                |  3 +++
 src/gui/widgets/window.cpp                 |  7 +++++++
 src/gui/widgets/window.h                   |  2 ++
 27 files changed, 305 insertions(+), 12 deletions(-)
 create mode 100644 data/graphics/gui/inventory.xml
 create mode 100644 data/graphics/gui/quests.xml
 create mode 100644 data/themes/enchilado/inventory.xml
 create mode 100644 data/themes/enchilado/quests.xml
 create mode 100644 data/themes/pink/inventory.xml
 create mode 100644 data/themes/pink/quests.xml
 create mode 100644 data/themes/unity/inventory.xml
 create mode 100644 data/themes/unity/quests.xml
 create mode 100644 data/themes/wood/inventory.xml
 create mode 100644 data/themes/wood/quests.xml

diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
index c192fc4af..7e051edef 100644
--- a/data/graphics/gui/CMakeLists.txt
+++ b/data/graphics/gui/CMakeLists.txt
@@ -19,12 +19,14 @@ SET (FILES
     equipment_playerbox.xml
     equipmentbox.png
     incomplete_icon.xml
+    inventory.xml
     item_selection.xml
     item_shortcut_background.xml
     mouse.png
     playerbox_background.xml
     progress-indicator.png
     progressbar.xml
+    quests.xml
     radio.xml
     resize.xml
     scroll.xml
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
index 4718081a4..723ddb373 100644
--- a/data/graphics/gui/Makefile.am
+++ b/data/graphics/gui/Makefile.am
@@ -22,12 +22,14 @@ gui_DATA =				\
 	equipment_playerbox.xml	\
 	equipmentbox.png	\
 	incomplete_icon.xml	\
+	inventory.xml	\
 	item_selection.xml	\
 	item_shortcut_background.xml	\
 	mouse.png			\
 	playerbox_background.xml	\
 	progress-indicator.png		\
 	progressbar.xml			\
+	quests.xml			\
 	radio.xml			\
 	resize.xml			\
 	scroll.xml			\
diff --git a/data/graphics/gui/inventory.xml b/data/graphics/gui/inventory.xml
new file mode 100644
index 000000000..0b84ac910
--- /dev/null
+++ b/data/graphics/gui/inventory.xml
@@ -0,0 +1,23 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window">
+        <option name="showbackground" value="1" />
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="4" height="4" />
+        <part type="top-edge" xpos="4" ypos="0" width="32" height="4" />
+        <part type="top-right-corner" xpos="36" ypos="0" width="4" height="4" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="4" width="4" height="216" />
+        <part type="bg-quad" xpos="4" ypos="4" width="32" height="216" />
+        <part type="right-edge" xpos="36" ypos="4" width="4" height="216" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="220" width="4" height="4" />
+        <part type="bottom-edge" xpos="4" ypos="220" width="32" height="4" />
+        <part type="bottom-right-corner" xpos="36" ypos="220" width="4" height="4" />
+
+        <part type="closeImage" xpos="130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="145" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/graphics/gui/playerbox_background.xml b/data/graphics/gui/playerbox_background.xml
index 4a63cf25c..5fc994df5 100644
--- a/data/graphics/gui/playerbox_background.xml
+++ b/data/graphics/gui/playerbox_background.xml
@@ -1,5 +1,6 @@
 <skinset name="Default" image="window.png">
 	<widget type="Window" xpos="41" ypos="186">
+		<option name="drawbackground" value="1" />
 		<!-- Top Row -->
 		<part type="top-left-corner" xpos="0" ypos="0" width="4" height="4" />
 		<part type="top-edge" xpos="3" ypos="0" width="26" height="4" />
diff --git a/data/graphics/gui/quests.xml b/data/graphics/gui/quests.xml
new file mode 100644
index 000000000..04664d19d
--- /dev/null
+++ b/data/graphics/gui/quests.xml
@@ -0,0 +1,25 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window">
+        <option name="showlistbackground" value="1" />
+        <option name="showtextbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="4" height="4" />
+        <part type="top-edge" xpos="4" ypos="0" width="32" height="4" />
+        <part type="top-right-corner" xpos="36" ypos="0" width="4" height="4" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="4" width="4" height="216" />
+        <part type="bg-quad" xpos="4" ypos="4" width="32" height="216" />
+        <part type="right-edge" xpos="36" ypos="4" width="4" height="216" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="220" width="4" height="4" />
+        <part type="bottom-edge" xpos="4" ypos="220" width="32" height="4" />
+        <part type="bottom-right-corner" xpos="36" ypos="220" width="4" height="4" />
+
+        <part type="closeImage" xpos="130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="145" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/enchilado/CMakeLists.txt b/data/themes/enchilado/CMakeLists.txt
index 390a1ba4a..3c4275797 100644
--- a/data/themes/enchilado/CMakeLists.txt
+++ b/data/themes/enchilado/CMakeLists.txt
@@ -1,5 +1,7 @@
 SET (FILES
     colors.xml
+    inventory.xml
+    quests.xml
     window.png
     window.xml
     )
diff --git a/data/themes/enchilado/Makefile.am b/data/themes/enchilado/Makefile.am
index 289cd7a9a..1876166a4 100644
--- a/data/themes/enchilado/Makefile.am
+++ b/data/themes/enchilado/Makefile.am
@@ -3,6 +3,8 @@ guidir = $(pkgdatadir)/data/themes/enchilado
 
 gui_DATA =				\
 	colors.xml		\
+	inventory.xml		\
+	quests.xml		\
 	window.png			\
 	window.xml
 
diff --git a/data/themes/enchilado/inventory.xml b/data/themes/enchilado/inventory.xml
new file mode 100644
index 000000000..6f1006f71
--- /dev/null
+++ b/data/themes/enchilado/inventory.xml
@@ -0,0 +1,24 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="190" ypos="30">
+        <option name="showbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-60" ypos="-30" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-60" ypos="21" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-45" ypos="21" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/enchilado/quests.xml b/data/themes/enchilado/quests.xml
new file mode 100644
index 000000000..da4d306a9
--- /dev/null
+++ b/data/themes/enchilado/quests.xml
@@ -0,0 +1,24 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="190" ypos="30">
+        <option name="showlistbackground" value="1" />
+        <option name="showtextbackground" value="1" />
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-60" ypos="-30" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-60" ypos="21" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-45" ypos="21" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/pink/CMakeLists.txt b/data/themes/pink/CMakeLists.txt
index 13608ad49..128189528 100644
--- a/data/themes/pink/CMakeLists.txt
+++ b/data/themes/pink/CMakeLists.txt
@@ -1,7 +1,9 @@
 SET (FILES
     bubble.png
     colors.xml
+    inventory.xml
     progress-indicator.png
+    quests.xml
     unknown-item.png
     window.png
     window.xml
diff --git a/data/themes/pink/Makefile.am b/data/themes/pink/Makefile.am
index 2c3f4867e..3d120b6bf 100644
--- a/data/themes/pink/Makefile.am
+++ b/data/themes/pink/Makefile.am
@@ -4,7 +4,9 @@ guidir = $(pkgdatadir)/data/themes/pink
 gui_DATA =				\
 	bubble.png			\
 	colors.xml		\
+	inventory.xml		\
 	progress-indicator.png		\
+	quests.xml		\
 	unknown-item.png		\
 	window.xml		\
 	window.png
diff --git a/data/themes/pink/inventory.xml b/data/themes/pink/inventory.xml
new file mode 100644
index 000000000..f6ffe5cc9
--- /dev/null
+++ b/data/themes/pink/inventory.xml
@@ -0,0 +1,24 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="250" ypos="0">
+        <option name="showbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="0" ypos="10" width="10" height="10" />
+        <part type="top-right-corner" xpos="0" ypos="20" width="10" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="30" width="10" height="10" />
+        <part type="bg-quad" xpos="0" ypos="40" width="10" height="10" />
+        <part type="right-edge" xpos="0" ypos="50" width="10" height="10" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="60" width="10" height="10" />
+        <part type="bottom-edge" xpos="0" ypos="70" width="10" height="10" />
+        <part type="bottom-right-corner" xpos="10" ypos="0" width="132" height="134" />
+
+        <part type="closeImage" xpos="-120" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-120" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-105" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/pink/quests.xml b/data/themes/pink/quests.xml
new file mode 100644
index 000000000..98d3c754c
--- /dev/null
+++ b/data/themes/pink/quests.xml
@@ -0,0 +1,25 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="250" ypos="0">
+        <option name="showlistbackground" value="1" />
+        <option name="showtextbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="0" ypos="10" width="10" height="10" />
+        <part type="top-right-corner" xpos="0" ypos="20" width="10" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="30" width="10" height="10" />
+        <part type="bg-quad" xpos="0" ypos="40" width="10" height="10" />
+        <part type="right-edge" xpos="0" ypos="50" width="10" height="10" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="60" width="10" height="10" />
+        <part type="bottom-edge" xpos="0" ypos="70" width="10" height="10" />
+        <part type="bottom-right-corner" xpos="10" ypos="0" width="132" height="134" />
+
+        <part type="closeImage" xpos="-120" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-120" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-105" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/unity/CMakeLists.txt b/data/themes/unity/CMakeLists.txt
index b9ac5df09..ec17e21a7 100644
--- a/data/themes/unity/CMakeLists.txt
+++ b/data/themes/unity/CMakeLists.txt
@@ -2,8 +2,10 @@ SET (FILES
     beingpopup.xml
     char.xml
     colors.xml
+    inventory.xml
     itempopup.xml
     popup.xml
+    quests.xml
     textpopup.xml
     window.png
     window.xml
diff --git a/data/themes/unity/Makefile.am b/data/themes/unity/Makefile.am
index 8285ddd3a..faca6ab65 100644
--- a/data/themes/unity/Makefile.am
+++ b/data/themes/unity/Makefile.am
@@ -5,8 +5,10 @@ gui_DATA =				\
 	beingpopup.xml			\
 	char.xml			\
 	colors.xml		\
+	inventory.xml		\
 	itempopup.xml		\
 	popup.xml		\
+	quests.xml		\
 	textpopup.xml			\
 	window.png			\
 	window.xml
diff --git a/data/themes/unity/inventory.xml b/data/themes/unity/inventory.xml
new file mode 100644
index 000000000..dde95c2f9
--- /dev/null
+++ b/data/themes/unity/inventory.xml
@@ -0,0 +1,25 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="260" ypos="0">
+        <option name="showbackground" value="1" />
+
+        <option name="padding" value="10" />
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-115" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/unity/quests.xml b/data/themes/unity/quests.xml
new file mode 100644
index 000000000..16283c02d
--- /dev/null
+++ b/data/themes/unity/quests.xml
@@ -0,0 +1,25 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="260" ypos="0">
+        <option name="padding" value="10" />
+        <option name="showlistbackground" value="1" />
+        <option name="showtextbackground" value="1" />
+        <!-- Top Row -->
+        <part type="top-left-corner" xpos="0" ypos="0" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-115" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/wood/CMakeLists.txt b/data/themes/wood/CMakeLists.txt
index 78f56ef23..97e8f3656 100644
--- a/data/themes/wood/CMakeLists.txt
+++ b/data/themes/wood/CMakeLists.txt
@@ -1,7 +1,9 @@
 SET (FILES
     colors.xml
+    inventory.xml
     item_shortcut_bgr.png
     mouse.png
+    quests.xml
     window.png
     window.xml
     )
diff --git a/data/themes/wood/Makefile.am b/data/themes/wood/Makefile.am
index d6e202ff1..539d72a60 100644
--- a/data/themes/wood/Makefile.am
+++ b/data/themes/wood/Makefile.am
@@ -3,8 +3,10 @@ guidir = $(pkgdatadir)/data/themes/wood
 
 gui_DATA =				\
 	colors.xml		\
+	inventory.xml		\
 	item_shortcut_bgr.png		\
 	mouse.png			\
+	quests.xml			\
 	window.png			\
 	window.xml
 
diff --git a/data/themes/wood/inventory.xml b/data/themes/wood/inventory.xml
new file mode 100644
index 000000000..39c568e78
--- /dev/null
+++ b/data/themes/wood/inventory.xml
@@ -0,0 +1,24 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="260" ypos="0">
+        <option name="showbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-115" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/data/themes/wood/quests.xml b/data/themes/wood/quests.xml
new file mode 100644
index 000000000..1ecdb91ad
--- /dev/null
+++ b/data/themes/wood/quests.xml
@@ -0,0 +1,25 @@
+<skinset name="Default" image="window.png">
+    <widget type="Window" xpos="260" ypos="0">
+        <option name="showlistbackground" value="1" />
+        <option name="showtextbackground" value="1" />
+
+        <!-- Top Row -->
+        <part type="top-left-corner" width="10" height="10" />
+        <part type="top-edge" xpos="11" ypos="0" width="127" height="10" />
+        <part type="top-right-corner" xpos="139" ypos="0" width="12" height="10" />
+
+        <!-- Middle Row -->
+        <part type="left-edge" xpos="0" ypos="11" width="10" height="81" />
+        <part type="bg-quad" xpos="11" ypos="11" width="127" height="81" />
+        <part type="right-edge" xpos="139" ypos="11" width="12" height="81" />
+
+        <!-- Bottom Row -->
+        <part type="bottom-left-corner" xpos="0" ypos="93" width="10" height="12" />
+        <part type="bottom-edge" xpos="11" ypos="93" width="127" height="12" />
+        <part type="bottom-right-corner" xpos="139" ypos="93" width="12" height="12" />
+
+        <part type="closeImage" xpos="-130" ypos="0" width="15" height="15" />
+        <part type="stickyImageUp" xpos="-130" ypos="51" width="15" height="15" />
+        <part type="stickyImageDown" xpos="-115" ypos="51" width="15" height="15" />
+    </widget>
+</skinset>
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index e4a318d69..b448ef80d 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -135,7 +135,8 @@ InventoryWindow::InventoryWindow(Inventory *inventory):
     mItems = new ItemContainer(mInventory);
     mItems->addSelectionListener(this);
 
-    gcn::ScrollArea *invenScroll = new ScrollArea(mItems);
+    gcn::ScrollArea *invenScroll = new ScrollArea(
+        mItems, getOptionBool("showbackground"));
     invenScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
 
     mSlotsLabel = new Label(_("Slots:"));
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp
index a33de32b6..fdda10562 100644
--- a/src/gui/questswindow.cpp
+++ b/src/gui/questswindow.cpp
@@ -82,12 +82,14 @@ class QuestsModel : public ExtendedNamesModel
 };
 
 QuestsWindow::QuestsWindow() :
-    Window(_("Quests"), false, nullptr, "quest.xml"),
+    Window(_("Quests"), false, nullptr, "quests.xml"),
     mQuestsModel(new QuestsModel),
     mQuestsListBox(new ExtendedListBox(mQuestsModel)),
-    mQuestScrollArea(new ScrollArea(mQuestsListBox)),
+    mQuestScrollArea(new ScrollArea(mQuestsListBox,
+        getOptionBool("showlistbackground"))),
     mText(new BrowserBox(BrowserBox::AUTO_WRAP)),
-    mTextScrollArea(new ScrollArea(mText)),
+    mTextScrollArea(new ScrollArea(mText,
+        getOptionBool("showtextbackground"))),
     mCloseButton(new Button(_("Close"), "close", this)),
     mCompleteIcon(Theme::getImageFromThemeXml("complete_icon.xml")),
     mIncompleteIcon(Theme::getImageFromThemeXml("incomplete_icon.xml"))
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index f0a6a5e89..423f26563 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -38,14 +38,18 @@
 
 PlayerBox::PlayerBox(Being *being, std::string skin):
     mBeing(being),
-    mAlpha(1.0)
+    mAlpha(1.0),
+    mSkin(nullptr),
+    mDrawBackground(false)
 {
     init(skin);
 }
 
 PlayerBox::PlayerBox(std::string skin):
     mBeing(nullptr),
-    mAlpha(1.0)
+    mAlpha(1.0),
+    mSkin(nullptr),
+    mDrawBackground(false)
 {
     init(skin);
 }
@@ -53,7 +57,10 @@ PlayerBox::PlayerBox(std::string skin):
 PlayerBox::~PlayerBox()
 {
     if (Theme::instance())
+    {
+        Theme::instance()->unload(mSkin);
         Theme::instance()->unloadRect(mBackground);
+    }
 
     mBeing = nullptr;
 }
@@ -66,7 +73,9 @@ void PlayerBox::init(std::string skin)
     {
         if (skin.empty())
             skin = "playerbox_background.xml";
-        Theme::instance()->loadRect(mBackground, skin);
+        mSkin = Theme::instance()->loadSkinRect(mBackground, skin);
+        if (mSkin)
+            mDrawBackground = (mSkin->getOption("drawbackground") != 0);
     }
     else
     {
@@ -98,10 +107,14 @@ void PlayerBox::draw(gcn::Graphics *graphics)
 
 void PlayerBox::drawFrame(gcn::Graphics *graphics)
 {
-    int w, h, bs;
-    bs = getFrameSize();
-    w = getWidth() + bs * 2;
-    h = getHeight() + bs * 2;
+    if (mDrawBackground)
+    {
+        int w, h, bs;
+        bs = getFrameSize();
+        w = getWidth() + bs * 2;
+        h = getHeight() + bs * 2;
 
-    static_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, mBackground);
+        static_cast<Graphics*>(graphics)->drawImageRect(
+            0, 0, w, h, mBackground);
+    }
 }
diff --git a/src/gui/widgets/playerbox.h b/src/gui/widgets/playerbox.h
index 6498e69ec..4f413f23c 100644
--- a/src/gui/widgets/playerbox.h
+++ b/src/gui/widgets/playerbox.h
@@ -31,6 +31,7 @@
 
 class Being;
 class ImageRect;
+class Skin;
 
 /**
  * A box showing a player character.
@@ -81,6 +82,8 @@ class PlayerBox : public gcn::ScrollArea
 
         float mAlpha;
         ImageRect mBackground;
+        Skin *mSkin;
+        bool mDrawBackground;
 };
 
 #endif
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index f84376f2d..3fb0649c2 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -1029,3 +1029,10 @@ int Window::getOption(std::string name)
         return mSkin->getOption(name);
     return 0;
 }
+
+bool Window::getOptionBool(std::string name)
+{
+    if (mSkin)
+        return mSkin->getOption(name) != 0;
+    return 0;
+}
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index ee49f2852..12c40859a 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -401,6 +401,8 @@ class Window : public gcn::Window, gcn::WidgetListener
 
         int getOption(std::string name);
 
+        bool getOptionBool(std::string name);
+
     protected:
         bool canMove();
 
-- 
cgit v1.2.3-70-g09d2