Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
84593cae
Commit
84593cae
authored
Oct 02, 1994
by
Paul Reilly
Browse files
(display_menu_item): Add support for displaying the title in pop up menus.
parent
f78c5177
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lwlib/xlwmenu.c
lwlib/xlwmenu.c
+11
-2
No files found.
lwlib/xlwmenu.c
View file @
84593cae
...
...
@@ -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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment