Commit 84593cae authored by Paul Reilly's avatar Paul Reilly
Browse files

(display_menu_item): Add support for displaying the title in pop up menus.

parent f78c5177
......@@ -516,10 +516,19 @@ display_menu_item (mw, val, ws, where, highlighted_p, horizontal_p, just_compute
}
else
{
int x_offset = x + h_spacing + shadow;
char* display_string = resource_widget_value (mw, val);
draw_shadow_rectangle (mw, ws->window, x, y, width, height, True);
XDrawString (XtDisplay (mw), ws->window, text_gc,
x + h_spacing + shadow,
/* Deal with centering a menu title. */
if (!horizontal_p && !val->contents && !val->call_data)
{
int l = string_width (mw, display_string);
if (width > l)
x_offset = (width - l) >> 1;
}
XDrawString (XtDisplay (mw), ws->window, text_gc, x_offset,
y + v_spacing + shadow + font_ascent,
display_string, strlen (display_string));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment