From def23555acf313526ecec1c94684932ee8541335 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Mon, 25 Jul 2011 23:36:00 +0200 Subject: Added true arrows graphics to tab area buttons. --- data/graphics/gui/CMakeLists.txt | 2 ++ data/graphics/gui/tab_arrows_left.png | Bin 0 -> 292 bytes data/graphics/gui/tab_arrows_right.png | Bin 0 -> 285 bytes src/gui/widgets/tabbedarea.cpp | 8 ++++++-- src/gui/widgets/tabbedarea.h | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 data/graphics/gui/tab_arrows_left.png create mode 100644 data/graphics/gui/tab_arrows_right.png diff --git a/data/graphics/gui/CMakeLists.txt b/data/graphics/gui/CMakeLists.txt index d1a025f6..cc257eee 100644 --- a/data/graphics/gui/CMakeLists.txt +++ b/data/graphics/gui/CMakeLists.txt @@ -41,6 +41,8 @@ SET (FILES speechbubble.xml sticky_button.png tab.png + tab_arrows_left.png + tab_arrows_right.png tab_hilight.png tabselected.png unknown-item.png diff --git a/data/graphics/gui/tab_arrows_left.png b/data/graphics/gui/tab_arrows_left.png new file mode 100644 index 00000000..c14590d8 Binary files /dev/null and b/data/graphics/gui/tab_arrows_left.png differ diff --git a/data/graphics/gui/tab_arrows_right.png b/data/graphics/gui/tab_arrows_right.png new file mode 100644 index 00000000..8309c68e Binary files /dev/null and b/data/graphics/gui/tab_arrows_right.png differ diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp index 412d3ddc..9b51b311 100644 --- a/src/gui/widgets/tabbedarea.cpp +++ b/src/gui/widgets/tabbedarea.cpp @@ -33,8 +33,12 @@ TabbedArea::TabbedArea() : gcn::TabbedArea(), mWidgetContainer->setOpaque(false); addWidgetListener(this); - mArrowButton[0] = new Button("<", "shift_left", this); - mArrowButton[1] = new Button(">", "shift_right", this); + mArrowButton[0] = new Button("", "shift_left", this); + mArrowButton[1] = new Button("", "shift_right", this); + if (!mArrowButton[0]->setButtonIcon("tab_arrows_left.png")) + mArrowButton[0]->setCaption("<"); + if (!mArrowButton[1]->setButtonIcon("tab_arrows_right.png")) + mArrowButton[1]->setCaption(">"); add(mArrowButton[0]); add(mArrowButton[1]); diff --git a/src/gui/widgets/tabbedarea.h b/src/gui/widgets/tabbedarea.h index d364eac5..cb29a756 100644 --- a/src/gui/widgets/tabbedarea.h +++ b/src/gui/widgets/tabbedarea.h @@ -117,7 +117,7 @@ class TabbedArea : public gcn::TabbedArea, public gcn::WidgetListener typedef std::vector< std::pair > TabContainer; /** The tab arrows */ - gcn::Button *mArrowButton[2]; + Button *mArrowButton[2]; /** Check whether the arrow should be clickable */ void updateArrowEnableState(); -- cgit v1.2.3-70-g09d2