From: Dana Jansens Date: Tue, 27 May 2003 04:42:04 +0000 (+0000) Subject: proper layout X-Git-Tag: gl2~83 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=195c9afba1c45e99fc2a43861bcc630c38a28548;p=dana%2Fopenbox.git proper layout --- diff --git a/openbox/popup.c b/openbox/popup.c index e4e4a554..84144014 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -57,22 +57,21 @@ Popup *popup_new(gboolean hasicon) self->icon = None; } + /* XXX COPY THE APPEARANCES FROM THE THEME...... LIKE THIS SORTA! + self->a_text = appearance_copy(theme_app_hilite_label); + */ RrColorSet(&pri, 1, 0, 0, 0); RrColorSet(&sec, 0, 1, 0, 0); RrPlanarSet(self->s_bg, RR_PLANAR_VERTICAL, &pri, &sec); - RrColorSet(&pri, 0, 0.5, 0, 1); - RrColorSet(&sec, 0.5, 0, 0.5, 1); + RrColorSet(&pri, 0, 0.5, 0, 0.7); + RrColorSet(&sec, 0.5, 0, 0.5, 0.7); RrPlanarSet(self->s_text, RR_PLANAR_HORIZONTAL, &pri, &sec); if (self->s_icon) { - RrColorSet(&pri, 0, 0, 1, 1); - RrColorSet(&sec, 0.5, 0.5, 0, 1); + RrColorSet(&pri, 0, 0, 1, 0.7); + RrColorSet(&sec, 0.5, 0.5, 0, 0.7); RrPlanarSet(self->s_icon, RR_PLANAR_HORIZONTAL, &pri, &sec); } - /* XXX COPY THE APPEARANCES FROM THE THEME...... LIKE THIS SORTA! - self->a_text = appearance_copy(theme_app_hilite_label); - */ - return self; } @@ -132,15 +131,17 @@ void popup_show(Popup *self, char *text, Icon *icon) outer sizes */ if (self->h) { h = self->h; - texth = h - (theme_bevel * 2); + texth = h - (theme_bevel * 2) - theme_bwidth * 2; } else - h = texth + theme_bevel * 2; + h = texth + theme_bevel * 2 + theme_bwidth * 2; iconw = (self->hasicon ? texth : 0); if (self->w) { w = self->w; - textw = w - (iconw + theme_bevel * (self->hasicon ? 3 : 2)); + textw = w - (iconw + theme_bevel * (self->hasicon ? 3 : 2)) - + theme_bwidth * 2; } else - w = textw + iconw + theme_bevel * (self->hasicon ? 3 : 2); + w = textw + iconw + theme_bevel * (self->hasicon ? 3 : 2) + + theme_bwidth * 2; /* sanity checks to avoid crashes! */ if (w < 1) w = 1; if (h < 1) h = 1; @@ -181,7 +182,7 @@ void popup_show(Popup *self, char *text, Icon *icon) RrSurfaceSetArea(self->s_bg, x, y, w, h); RrSurfaceSetArea(self->s_text, - iconw + theme_bevel * (self->hasicon ? 3 : 2) + + iconw + theme_bevel * (self->hasicon ? 2 : 1) + theme_bwidth, theme_bevel + theme_bwidth, textw, texth);