summaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-04-14 08:20:56 +0000
committerDana Jansens <danakj@orodu.net>2002-04-14 08:20:56 +0000
commitbb1a97327b08fa5c1b8025083fc39498b3256c84 (patch)
treea715cfd774ee5ef96e928c60294852dede5b966e /src/Toolbar.cc
parent18acd962a598623cfa6f4b5d7472173433ef1310 (diff)
changing the fix for fonts clipping in the titlebar. broken fonts (e.g. gelly caused problems in the old method.
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index 88cf1a02..79a64dac 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -267,8 +267,11 @@ void Toolbar::reconfigure(void) {
if (ttmp != -1) {
tt = localtime(&ttmp);
if (tt) {
- char t[1024], *time_string = (char *) 0;
+ char t[1025], *time_string = (char *) 0;
int len = strftime(t, 1024, screen->getStrftimeFormat(), tt);
+ t[len++-1] = ' '; // add a space to the string for padding
+ t[len++-1] = ' '; // add a space to the string for padding
+ t[len] = '\0';
if (i18n->multibyte()) {
XRectangle ink, logical;
@@ -277,9 +280,9 @@ void Toolbar::reconfigure(void) {
frame.clock_w = logical.width;
// ben's additional solution to pad some space beside the numbers
- frame.clock_w +=
- screen->getToolbarStyle()->fontset_extents->max_logical_extent.width *
- 4;
+ //frame.clock_w +=
+ // screen->getToolbarStyle()->fontset_extents->max_logical_extent.width *
+ // 4;
// brad's solution, which is currently buggy, too big
//frame.clock_w =
@@ -288,7 +291,7 @@ void Toolbar::reconfigure(void) {
} else {
frame.clock_w = XTextWidth(screen->getToolbarStyle()->font, t, len);
// ben's additional solution to pad some space beside the numbers
- frame.clock_w += screen->getToolbarStyle()->font->max_bounds.width * 4;
+ //frame.clock_w += screen->getToolbarStyle()->font->max_bounds.width * 4;
// brad's solution again, too big
//frame.clock_w = screen->getToolbarStyle()->font->max_bounds.width * len;
}