From 2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 26 Dec 2002 17:22:53 +0000 Subject: support the button pressed resources better --- otk/style.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'otk/style.cc') diff --git a/otk/style.cc b/otk/style.cc index 5aeef434..fcc0ff2e 100644 --- a/otk/style.cc +++ b/otk/style.cc @@ -66,13 +66,21 @@ void Style::load(const Configuration &style) { b_focus = readDatabaseTexture("window.button.focus", "white", style); b_unfocus = readDatabaseTexture("window.button.unfocus", "black", style); - b_pressed = readDatabaseTexture("window.button.pressed", "black", style); //if neither of these can be found, we will use the previous resource b_pressed_focus = readDatabaseTexture("window.button.pressed.focus", "black", style, true); + if (b_pressed_focus.texture() == BTexture::NoTexture) { + b_pressed_focus = readDatabaseTexture("window.button.pressed", "black", + style); + } + b_pressed_unfocus = readDatabaseTexture("window.button.pressed.unfocus", "black", style, true); + if (b_pressed_unfocus.texture() == BTexture::NoTexture) { + b_pressed_unfocus = readDatabaseTexture("window.button.pressed", "black", + style); + } if (close_button.mask != None) XFreePixmap(OBDisplay::display, close_button.mask); -- cgit v1.2.3