Allow a theme to specify ellipsize width for a title
It's nice to indicate when a title is truncated with an ellipsis. Because themes may draw a title multiple times to draw a shadow, or may include the window icon within the title area, we can't determine the proper ellipsization width automatically, so add an optional attribute to the <title/> element "ellipsize_width" which, if set, is the width to ellipsize at. This is only enabled if a theme version of 3.1 is required. When it's not set, we keep the old behavior of just letting the title be clipped with a hard edge. https://bugzilla.gnome.org/show_bug.cgi?id=591842
This commit is contained in:
@@ -501,6 +501,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
|
||||
|
||||
frame->layout = gtk_widget_create_pango_layout (widget, frame->title);
|
||||
|
||||
pango_layout_set_ellipsize (frame->layout, PANGO_ELLIPSIZE_END);
|
||||
pango_layout_set_auto_dir (frame->layout, FALSE);
|
||||
|
||||
font_desc = meta_gtk_widget_get_font_desc (widget, scale,
|
||||
|
Reference in New Issue
Block a user