Skip to content

Commit

Permalink
Use PANGO_UNDERLINE_SINGLE for rendering shortcuts
Browse files Browse the repository at this point in the history
The pango docs say to use _LOW for accelerators, but that causes the line
to be drawn beneath the ink extents which for us may be outside the area
that gets displayed and we end up with no line at all. We also don't want
to extend every menu entry with enough space to fit this possible line.
  • Loading branch information
Mikachu committed Oct 28, 2014
1 parent d6797e5 commit 3961980
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion obrender/font.c
Expand Up @@ -73,7 +73,7 @@ RrFont *RrFontOpen(const RrInstance *inst, const gchar *name, gint size,
out->ref = 1;
out->font_desc = pango_font_description_new();
out->layout = pango_layout_new(inst->pango);
out->shortcut_underline = pango_attr_underline_new(PANGO_UNDERLINE_LOW);
out->shortcut_underline = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE);
out->shortcut_underline->start_index = 0;
out->shortcut_underline->end_index = 0;

Expand Down

0 comments on commit 3961980

Please sign in to comment.