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);
}
else
addTexture(BTexture::Raised);
- if (! (texture() & BTexture::Flat)) {
+ if (texture() & BTexture::Flat) {
+ if (descr.find("border") != string::npos)
+ addTexture(BTexture::Border);
+ } else {
if (descr.find("bevel2") != string::npos)
addTexture(BTexture::Bevel2);
else
ct.setDisplay(_display, _screen);
lc.setDisplay(_display, _screen);
sc.setDisplay(_display, _screen);
+ bc.setDisplay(_display, _screen);
}
ct = tt.ct;
lc = tt.lc;
sc = tt.sc;
+ bc = tt.bc;
descr = tt.descr;
t = tt.t;
dpy = tt.dpy;
Pixmap BTexture::render(const unsigned int width, const unsigned int height,
const Pixmap old) {
assert(display() != 0);
+ assert(texture() != BTexture::NoTexture);
if (texture() == (BTexture::Flat | BTexture::Solid))
return None;