summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-18 20:58:33 +0200
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-05-18 20:58:33 +0200
commitd9eea6e19d54c85a937b01f8a232e74e294a4697 (patch)
treedc1fdf1d182a2be7faec0294b0211823240162f8
parent64dade048df384289965157c81fb10c3eacef582 (diff)
downloadmana-d9eea6e19d54c85a937b01f8a232e74e294a4697.tar.gz
mana-d9eea6e19d54c85a937b01f8a232e74e294a4697.tar.bz2
mana-d9eea6e19d54c85a937b01f8a232e74e294a4697.tar.xz
mana-d9eea6e19d54c85a937b01f8a232e74e294a4697.zip
Restored the window background to its former glory
Well, opinions might differ about what looks better, but anyway. :P This also fixes the skin to not take the repeating middle into account when calculating the minimum width and height. And due to the larger image parts it should perform a bit better with OpenGL.
-rw-r--r--data/graphics/gui/CMakeLists.txt3
-rw-r--r--data/graphics/gui/Makefile.am5
-rw-r--r--data/graphics/gui/bg_quad_dis.pngbin5241 -> 0 bytes
-rw-r--r--data/graphics/gui/default.pngbin817 -> 0 bytes
-rw-r--r--data/graphics/gui/gui.xml26
-rw-r--r--data/graphics/gui/window.pngbin0 -> 3410 bytes
-rw-r--r--src/gui/skin.cpp10
7 files changed, 20 insertions, 24 deletions
diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt
index 78fde595..920f3b88 100644
--- a/data/graphics/gui/CMakeLists.txt
+++ b/data/graphics/gui/CMakeLists.txt
@@ -1,5 +1,4 @@
SET (FILES
- bg_quad_dis.png
bubble.png
button.png
button_disabled.png
@@ -10,7 +9,6 @@ SET (FILES
circle-green.png
close_button.png
deepbox.png
- default.png
gui.xml
hscroll_left_default.png
hscroll_left_highlight.png
@@ -43,6 +41,7 @@ SET (FILES
vscroll_up_default.png
vscroll_up_highlight.png
vscroll_up_pressed.png
+ window.png
)
INSTALL(FILES ${FILES} DESTINATION ${DATA_DIR}/graphics/gui)
diff --git a/data/graphics/gui/Makefile.am b/data/graphics/gui/Makefile.am
index 98a0c2a5..a2bafb29 100644
--- a/data/graphics/gui/Makefile.am
+++ b/data/graphics/gui/Makefile.am
@@ -2,7 +2,6 @@
guidir = $(pkgdatadir)/data/graphics/gui
gui_DATA = \
- bg_quad_dis.png \
bubble.png \
button.png \
button_disabled.png \
@@ -13,7 +12,6 @@ gui_DATA = \
circle-green.png \
close_button.png \
deepbox.png \
- default.png \
gui.xml \
hscroll_left_default.png \
hscroll_left_highlight.png \
@@ -45,7 +43,8 @@ gui_DATA = \
vscroll_grey.png \
vscroll_up_default.png \
vscroll_up_highlight.png \
- vscroll_up_pressed.png
+ vscroll_up_pressed.png \
+ window.png
EXTRA_DIST = \
$(gui_DATA)
diff --git a/data/graphics/gui/bg_quad_dis.png b/data/graphics/gui/bg_quad_dis.png
deleted file mode 100644
index 3a0354bb..00000000
--- a/data/graphics/gui/bg_quad_dis.png
+++ /dev/null
Binary files differ
diff --git a/data/graphics/gui/default.png b/data/graphics/gui/default.png
deleted file mode 100644
index a8bc5baf..00000000
--- a/data/graphics/gui/default.png
+++ /dev/null
Binary files differ
diff --git a/data/graphics/gui/gui.xml b/data/graphics/gui/gui.xml
index fe62528e..f27dbc7f 100644
--- a/data/graphics/gui/gui.xml
+++ b/data/graphics/gui/gui.xml
@@ -1,18 +1,18 @@
-<skinset name="Default" image="default.png">
- <widget type="Window">
- <!-- Top Row -->
- <part type="top-left-corner" xpos="0" ypos="0" width="4" height="4" />
- <part type="top-edge" xpos="4" ypos="0" width="3" height="4" />
- <part type="top-right-corner" xpos="7" ypos="0" width="4" height="4" />
+<skinset name="Default" image="window.png">
+ <widget type="Window">
+ <!-- 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="10" />
- <part type="bg-quad" xpos="11" ypos="0" width="32" height="32" />
- <part type="right-edge" xpos="7" ypos="4" width="4" height="10" />
+ <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="15" width="4" height="4" />
- <part type="bottom-edge" xpos="4" ypos="15" width="3" height="4" />
- <part type="bottom-right-corner" xpos="7" ypos="15" width="4" height="4" />
+ <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" />
</widget>
-</skinset> \ No newline at end of file
+</skinset>
diff --git a/data/graphics/gui/window.png b/data/graphics/gui/window.png
new file mode 100644
index 00000000..f0ef1af4
--- /dev/null
+++ b/data/graphics/gui/window.png
Binary files differ
diff --git a/src/gui/skin.cpp b/src/gui/skin.cpp
index f6eb0d58..5881a073 100644
--- a/src/gui/skin.cpp
+++ b/src/gui/skin.cpp
@@ -101,16 +101,14 @@ void Skin::updateAlpha()
int Skin::getMinWidth() const
{
- return (mBorder.grid[ImageRect::UPPER_LEFT]->getWidth() +
- mBorder.grid[ImageRect::UPPER_CENTER]->getWidth()) +
- mBorder.grid[ImageRect::UPPER_RIGHT]->getWidth();
+ return mBorder.grid[ImageRect::UPPER_LEFT]->getWidth() +
+ mBorder.grid[ImageRect::UPPER_RIGHT]->getWidth();
}
int Skin::getMinHeight() const
{
- return (mBorder.grid[ImageRect::UPPER_LEFT]->getHeight() +
- mBorder.grid[ImageRect::LEFT]->getHeight()) +
- mBorder.grid[ImageRect::LOWER_LEFT]->getHeight();
+ return mBorder.grid[ImageRect::UPPER_LEFT]->getHeight() +
+ mBorder.grid[ImageRect::LOWER_LEFT]->getHeight();
}
SkinLoader::SkinLoader()