summaryrefslogtreecommitdiff
path: root/src/ButtonTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ButtonTool.cc')
-rw-r--r--src/ButtonTool.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ButtonTool.cc b/src/ButtonTool.cc
index 0640048..6ec9570 100644
--- a/src/ButtonTool.cc
+++ b/src/ButtonTool.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: ButtonTool.cc,v 1.5 2004/08/29 08:33:12 rathnor Exp $ 22// $Id: ButtonTool.cc,v 1.6 2004/09/12 14:56:18 rathnor Exp $
23 23
24#include "ButtonTool.hh" 24#include "ButtonTool.hh"
25 25
@@ -36,7 +36,6 @@ ButtonTool::ButtonTool(FbTk::Button *button,
36 m_cache_pressed_pm(0), 36 m_cache_pressed_pm(0),
37 m_image_ctrl(img_ctrl) { 37 m_image_ctrl(img_ctrl) {
38 38
39 renderTheme();
40} 39}
41 40
42ButtonTool::~ButtonTool() { 41ButtonTool::~ButtonTool() {
@@ -53,13 +52,13 @@ void ButtonTool::updateSizing() {
53 btn.setBorderWidth(theme().border().width()); 52 btn.setBorderWidth(theme().border().width());
54} 53}
55 54
56void ButtonTool::renderTheme() { 55void ButtonTool::renderTheme(unsigned char alpha) {
57 FbTk::Button &btn = static_cast<FbTk::Button &>(window()); 56 FbTk::Button &btn = static_cast<FbTk::Button &>(window());
58 57
59 btn.setGC(static_cast<const ButtonTheme &>(theme()).gc()); 58 btn.setGC(static_cast<const ButtonTheme &>(theme()).gc());
60 btn.setBorderColor(theme().border().color()); 59 btn.setBorderColor(theme().border().color());
61 btn.setBorderWidth(theme().border().width()); 60 btn.setBorderWidth(theme().border().width());
62 btn.setAlpha(theme().alpha()); 61 btn.setAlpha(alpha);
63 btn.updateTheme(static_cast<const FbTk::Theme &>(theme())); 62 btn.updateTheme(static_cast<const FbTk::Theme &>(theme()));
64 63
65 Pixmap old_pm = m_cache_pm; 64 Pixmap old_pm = m_cache_pm;