Bradley T Hughes wrote: [snip]
(see attached patch)
It helps if I would actually attach the damn thing. Don't I feel like a winner.
-- Bradley T. Hughes - bhughes at trolltech.com Trolltech AS - Waldemar Thranes gt. 98 N-0175 Oslo, Norway
? Makefile
? Makefile.in
? aclocal.m4
? blackbox.core
? config.guess
? config.h
? config.h.in
? config.log
? config.status
? config.sub
? configure
? configure.lineno
? depcomp
? diff
? go.sh
? install-sh
? libtool
? ltmain.sh
? missing
? stamp-h1
? version.h
? data/Makefile
? data/Makefile.in
? data/menu
? data/styles/Makefile
? data/styles/Makefile.in
? doc/Makefile
? doc/Makefile.in
? doc/blackbox.1
? doc/fr_FR/Makefile
? doc/fr_FR/Makefile.in
? doc/ja_JP/Makefile
? doc/ja_JP/Makefile.in
? doc/nl_NL/Makefile
? doc/nl_NL/Makefile.in
? doc/sl_SI/Makefile
? doc/sl_SI/Makefile.in
? lib/.deps
? lib/.libs
? lib/Application.lo
? lib/Bitmap.lo
? lib/Color.lo
? lib/Display.lo
? lib/EWMH.lo
? lib/Font.lo
? lib/Image.lo
? lib/Makefile
? lib/Makefile.in
? lib/Menu.lo
? lib/Pen.lo
? lib/PixmapCache.lo
? lib/Rect.lo
? lib/Resource.lo
? lib/Texture.lo
? lib/Timer.lo
? lib/Unicode.lo
? lib/Util.lo
? lib/libbt.cc
? lib/libbt.la
? lib/libbt.pc
? src/.deps
? src/.libs
? src/Makefile
? src/Makefile.in
? src/blackbox
? util/.deps
? util/.libs
? util/Makefile
? util/Makefile.in
? util/bsetroot
? util/bstyleconvert
Index: lib/Font.cc
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/lib/Font.cc,v
retrieving revision 1.40
diff -b -u -r1.40 Font.cc
--- lib/Font.cc 3 Jan 2005 09:42:52 -0000 1.40
+++ lib/Font.cc 27 Jan 2005 10:05:18 -0000
@@ -518,6 +518,16 @@
str.c_str(), str.length());
}
+void bt::drawShadowedText(const Font &font, const Pen &pen1, const Pen &pen2,
+ Drawable drawable, const Rect &rect,
+ Alignment alignment, const ustring &text) {
+ drawText(font, pen1, drawable, rect, alignment, text);
+
+ bt::Rect shadowRect = rect;
+ shadowRect.setPos(rect.x() + 1, rect.y() + 1);
+ drawText(font, pen2, drawable, shadowRect, alignment, text);
+}
+
bt::ustring bt::ellideText(const bt::ustring &text, size_t count,
const bt::ustring &ellide) {
Index: lib/Font.hh
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/lib/Font.hh,v
retrieving revision 1.22
diff -b -u -r1.22 Font.hh
--- lib/Font.hh 3 Jan 2005 09:42:52 -0000 1.22
+++ lib/Font.hh 27 Jan 2005 10:05:18 -0000
@@ -52,6 +52,11 @@
Drawable drawable, const Rect &rect,
Alignment alignment, const ustring &text);
+ void drawShadowedText(const Font &font, const Pen &pen1, const Pen &pen2,
+ Drawable drawable, const Rect &rect,
+ Alignment alignment, const ustring &text);
+
+
/*
* Take a string and make it 'count' chars long by removing the
* middle and replacing it with the string in 'ellide'.
Index: lib/Menu.cc
===================================================================
RCS file: /cvsroot/blackboxwm/blackbox/lib/Menu.cc,v
retrieving revision 1.68
diff -b -u -r1.68 Menu.cc
--- lib/Menu.cc 24 Jan 2005 09:06:10 -0000 1.68
+++ lib/Menu.cc 27 Jan 2005 10:05:18 -0000
@@ -144,8 +144,8 @@
unsigned int bt::MenuStyle::separatorHeight(void) const {
- return
- (frame.texture.borderWidth() > 0 ? frame.texture.borderWidth() : 1) + 2;
+ return (frame.texture.borderWidth() > 0 ? frame.texture.borderWidth() : 1)
+ + (2 * frame_margin);
}
@@ -199,7 +199,7 @@
if (item.isSeparator()) {
Pen pen(_screen, frame.foreground);
XFillRectangle(pen.XDisplay(), window, pen.gc(),
- r2.x(), r2.y() + 1, r2.width(),
+ r2.x(), r2.y() + frame_margin, r2.width(),
(frame.texture.borderWidth() > 0 ?
frame.texture.borderWidth() : 1));
return;
