Implement all text attributes for menus
This commit is contained in:
committed by
Pasi Kallinen
parent
84ff4f8b7e
commit
2d261f1398
+4
-8
@@ -172,6 +172,7 @@ menu_select(Widget w, XtPointer client_data, XtPointer call_data)
|
|||||||
|
|
||||||
XtSetArg(args[0], nhStr(XtNlabel), curr->str);
|
XtSetArg(args[0], nhStr(XtNlabel), curr->str);
|
||||||
XtSetValues(w, args, ONE);
|
XtSetValues(w, args, ONE);
|
||||||
|
X11_update_label(w);
|
||||||
|
|
||||||
if (menu_info->how == PICK_ONE)
|
if (menu_info->how == PICK_ONE)
|
||||||
menu_popdown(wp);
|
menu_popdown(wp);
|
||||||
@@ -218,6 +219,7 @@ invert_line(struct xwindow *wp, x11_menu_item *curr, int which, long how_many)
|
|||||||
XtSetValues(curr->w, args, ONE);
|
XtSetValues(curr->w, args, ONE);
|
||||||
curr->pick_count = -1L;
|
curr->pick_count = -1L;
|
||||||
}
|
}
|
||||||
|
X11_update_label(curr->w);
|
||||||
}
|
}
|
||||||
|
|
||||||
static XEvent fake_perminv_event;
|
static XEvent fake_perminv_event;
|
||||||
@@ -1356,14 +1358,8 @@ menu_create_entries(struct xwindow *wp, struct menu *curr_menu)
|
|||||||
? commandWidgetClass
|
? commandWidgetClass
|
||||||
: labelWidgetClass,
|
: labelWidgetClass,
|
||||||
wp->w, args, num_args);
|
wp->w, args, num_args);
|
||||||
|
X11_wrap_widget(curr->w);
|
||||||
if (attr == ATR_BOLD) {
|
X11_set_attrs(curr->w, 0x1 << attr);
|
||||||
load_boldfont(wp, curr->w);
|
|
||||||
num_args = 0;
|
|
||||||
XtSetArg(args[num_args], nhStr(XtNfont),
|
|
||||||
wp->boldfs); num_args++;
|
|
||||||
XtSetValues(curr->w, args, num_args);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canpick)
|
if (canpick)
|
||||||
XtAddCallback(linewidget, XtNcallback, menu_select,
|
XtAddCallback(linewidget, XtNcallback, menu_select,
|
||||||
|
|||||||
Reference in New Issue
Block a user