summaryrefslogtreecommitdiff
path: root/src/Texture.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-09-04 02:58:39 +0000
committerDana Jansens <danakj@orodu.net>2002-09-04 02:58:39 +0000
commit23aea9b42f24195d915ca3f0c4fa9dca778ba1cd (patch)
tree09798841bd2180d994fcaeca86f70ebdc15cac92 /src/Texture.cc
parent1f5dd220e735a0a9c0532ff8aa8b361d3327b0f2 (diff)
better border support for stuff. add a borderColor resource, and allow borders with gradients. basically, they can only be used with flat stuff (not raised/lowered)
Diffstat (limited to 'src/Texture.cc')
-rw-r--r--src/Texture.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Texture.cc b/src/Texture.cc
index 87825267..60923316 100644
--- a/src/Texture.cc
+++ b/src/Texture.cc
@@ -46,14 +46,14 @@ using std::string;
BTexture::BTexture(const BaseDisplay * const _display,
unsigned int _screen, BImageControl* _ctrl)
: c(_display, _screen), ct(_display, _screen),
- lc(_display, _screen), sc(_display, _screen), t(0),
+ lc(_display, _screen), sc(_display, _screen), bc(_display, _screen), t(0),
dpy(_display), ctrl(_ctrl), scrn(_screen) { }
BTexture::BTexture(const string &d, const BaseDisplay * const _display,
unsigned int _screen, BImageControl* _ctrl)
: c(_display, _screen), ct(_display, _screen),
- lc(_display, _screen), sc(_display, _screen), t(0),
+ lc(_display, _screen), sc(_display, _screen), bc(_display, _screen), t(0),
dpy(_display), ctrl(_ctrl), scrn(_screen) {
setDescription(d);
}
@@ -128,14 +128,15 @@ void BTexture::setDescription(const string &d) {
if (descr.find("sunken") != string::npos)
addTexture(BTexture::Sunken);
- else if (descr.find("flatborder") != string::npos)
- addTexture(BTexture::FlatBorder);
else if (descr.find("flat") != string::npos)
addTexture(BTexture::Flat);
else
addTexture(BTexture::Raised);
- if (! (texture() & (BTexture::Flat | BTexture::FlatBorder))) {
+ if (texture() & BTexture::Flat) {
+ if (descr.find("border") != string::npos)
+ addTexture(BTexture::Border);
+ } else {
if (descr.find("bevel2") != string::npos)
addTexture(BTexture::Bevel2);
else
@@ -160,6 +161,7 @@ void BTexture::setDisplay(const BaseDisplay * const _display,
ct.setDisplay(_display, _screen);
lc.setDisplay(_display, _screen);
sc.setDisplay(_display, _screen);
+ bc.setDisplay(_display, _screen);
}
@@ -168,6 +170,7 @@ BTexture& BTexture::operator=(const BTexture &tt) {
ct = tt.ct;
lc = tt.lc;
sc = tt.sc;
+ bc = tt.bc;
descr = tt.descr;
t = tt.t;
dpy = tt.dpy;