From d9eea6e19d54c85a937b01f8a232e74e294a4697 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 18 May 2009 20:58:33 +0200 Subject: 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. --- data/graphics/gui/CMakeLists.txt | 3 +-- data/graphics/gui/Makefile.am | 5 ++--- data/graphics/gui/bg_quad_dis.png | Bin 5241 -> 0 bytes data/graphics/gui/default.png | Bin 817 -> 0 bytes data/graphics/gui/gui.xml | 26 +++++++++++++------------- data/graphics/gui/window.png | Bin 0 -> 3410 bytes src/gui/skin.cpp | 10 ++++------ 7 files changed, 20 insertions(+), 24 deletions(-) delete mode 100644 data/graphics/gui/bg_quad_dis.png delete mode 100644 data/graphics/gui/default.png create mode 100644 data/graphics/gui/window.png 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 Binary files a/data/graphics/gui/bg_quad_dis.png and /dev/null differ diff --git a/data/graphics/gui/default.png b/data/graphics/gui/default.png deleted file mode 100644 index a8bc5baf..00000000 Binary files a/data/graphics/gui/default.png and /dev/null 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 @@ - - - - - - + + + + + + - - - + + + - - - + + + - \ No newline at end of file + diff --git a/data/graphics/gui/window.png b/data/graphics/gui/window.png new file mode 100644 index 00000000..f0ef1af4 Binary files /dev/null and b/data/graphics/gui/window.png 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() -- cgit v1.2.3-70-g09d2