use a size not area for the label
This commit is contained in:
parent
0272ef26e7
commit
7b5a51db2b
2 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,7 @@ typedef void EngineFrameHide(Frame *self);
|
|||
/* get_context */
|
||||
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);
|
||||
|
||||
typedef void EngineSizeLabel(char *text, gboolean hilight, gboolean toplevel,
|
||||
|
|
|
@ -203,14 +203,14 @@ static void obrender_close(ObFrame *self, Appearance *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)
|
||||
{
|
||||
Appearance *a;
|
||||
|
||||
a = hilight ? ob_app_hilite_label : ob_app_unhilite_label;
|
||||
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;
|
||||
|
||||
if (toplevel) {
|
||||
|
|
Loading…
Reference in a new issue