diff options
| author | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-03 03:58:07 +0000 |
|---|---|---|
| committer | Scott Moynes <smoynes@nexus.carleton.ca> | 2002-10-03 03:58:07 +0000 |
| commit | 987cf7cc40d4ab9c5e895ea2b0c7a77f10a0510f (patch) | |
| tree | a62d2ea4cc1c813f87ca4e257fb5641891ed81a1 /src/Screen.cc | |
| parent | efd6c59c90aeff5bfd2fb76b3085e837aacb0596 (diff) | |
Added style resources for window.button.pressed.focus: and
window.button.pressed.unfocus:
Documentation to be added.
Diffstat (limited to 'src/Screen.cc')
| -rw-r--r-- | src/Screen.cc | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 7e7ce5a4..92f04532 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1065,6 +1065,12 @@ void BScreen::LoadStyle(void) { resource.wstyle.b_pressed = readDatabaseTexture("window.button.pressed", "black", style); + //if neither of these can be found, we will use the previous resource + resource.wstyle.b_pressed_focus = + readDatabaseTexture("window.button.pressed.focus", "black", style, true); + resource.wstyle.b_pressed_unfocus = + readDatabaseTexture("window.button.pressed.unfocus", "black", style, true); + #ifdef BITMAPBUTTONS if (resource.wstyle.close_button.mask != None) XFreePixmap(blackbox->getXDisplay(), resource.wstyle.close_button.mask); @@ -2671,12 +2677,15 @@ void BScreen::readDatabaseMask(const string &rname, PixmapMask &pixmapMask, BTexture BScreen::readDatabaseTexture(const string &rname, const string &default_color, - const Configuration &style) { + const Configuration &style, + bool allowNoTexture) { BTexture texture; string s; if (style.getValue(rname, s)) texture = BTexture(s); + else if (allowNoTexture) //no default + texture.setTexture(BTexture::NoTexture); else texture.setTexture(BTexture::Solid | BTexture::Flat); @@ -2684,12 +2693,15 @@ BTexture BScreen::readDatabaseTexture(const string &rname, texture.setDisplay(getBaseDisplay(), getScreenNumber()); texture.setImageControl(image_control); - texture.setColor(readDatabaseColor(rname + ".color", default_color, style)); - texture.setColorTo(readDatabaseColor(rname + ".colorTo", default_color, + if (texture.texture() != BTexture::NoTexture) { + texture.setColor(readDatabaseColor(rname + ".color", default_color, style)); - texture.setBorderColor(readDatabaseColor(rname + ".borderColor", - default_color, style)); - + texture.setColorTo(readDatabaseColor(rname + ".colorTo", default_color, + style)); + texture.setBorderColor(readDatabaseColor(rname + ".borderColor", + default_color, style)); + } + return texture; } |
