use a size not area for the label

This commit is contained in:
Dana Jansens 2003-04-08 02:00:08 +00:00
parent 0272ef26e7
commit 7b5a51db2b
2 changed files with 3 additions and 3 deletions

View file

@ -50,7 +50,7 @@ typedef void EngineFrameHide(Frame *self);
/* get_context */ /* get_context */
typedef Context EngineGetContext(Client *client, Window win); typedef Context EngineGetContext(Client *client, Window win);
typedef void EngineRenderLabel(Window win, Rect *area, char *text, typedef void EngineRenderLabel(Window win, Size *sz, char *text,
gboolean hilight, gboolean toplevel); gboolean hilight, gboolean toplevel);
typedef void EngineSizeLabel(char *text, gboolean hilight, gboolean toplevel, typedef void EngineSizeLabel(char *text, gboolean hilight, gboolean toplevel,

View file

@ -203,14 +203,14 @@ static void obrender_close(ObFrame *self, Appearance *a)
paint(self->close, a); paint(self->close, a);
} }
void render_label(Window win, Rect *area, char *text, void render_label(Window win, Size *sz, char *text,
gboolean hilight, gboolean toplevel) gboolean hilight, gboolean toplevel)
{ {
Appearance *a; Appearance *a;
a = hilight ? ob_app_hilite_label : ob_app_unhilite_label; a = hilight ? ob_app_hilite_label : ob_app_unhilite_label;
a->texture[0].data.text.string = text; a->texture[0].data.text.string = text;
RECT_SET(a->area, 0, 0, area->width, area->height); RECT_SET(a->area, 0, 0, sz->width, sz->height);
a->texture[0].position = a->area; a->texture[0].position = a->area;
if (toplevel) { if (toplevel) {