diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-26 17:22:53 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-26 17:22:53 +0000 |
| commit | 2b2f81b93c89c2a2d6abc3b12dee66b8e2a0452d (patch) | |
| tree | 2705227033d83d5fc9e1bbbde6143c7c6ab96fb7 /otk/style.cc | |
| parent | 5029fc97c81c25c8934989722985e772079bc166 (diff) | |
support the button pressed resources better
Diffstat (limited to 'otk/style.cc')
| -rw-r--r-- | otk/style.cc | 10 |
1 files changed, 9 insertions, 1 deletions
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); |
