diff options
author | Florian Müllner <fmuellner@gnome.org> | 2014-09-25 06:44:45 +0200 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2015-02-19 18:50:54 +0200 |
commit | dce01fa7e380f20edd4f14bfde723aa9031c797b (patch) | |
tree | 8bd2aff33d4a13b45528fa8f05f31554031a0ffa /src/ui/frames.c | |
parent | 3a3c47e3124fed711605deb15fbad2243f277e03 (diff) | |
download | metacity-dce01fa7e380f20edd4f14bfde723aa9031c797b.tar.gz |
frames: Use title style to set up title layout
Sounds obvious, doesn't it?
After this change when titlebar-uses-system-font is set, the "system
font" used will not be a generic one, but match what GTK+ uses in
client-side decorations.
https://bugzilla.gnome.org/show_bug.cgi?id=741917
NOTE: Updated for metacity.
Diffstat (limited to 'src/ui/frames.c')
-rw-r--r-- | src/ui/frames.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/ui/frames.c b/src/ui/frames.c index d45f9978..68daa615 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -508,22 +508,29 @@ meta_frames_ensure_layout (MetaFrames *frames, { gpointer key, value; PangoFontDescription *font_desc; - double scale; int size; - scale = meta_theme_get_title_scale (meta_theme_get_current (), - type, - flags); - 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); - pango_layout_set_single_paragraph_mode (frame->layout, TRUE); - font_desc = meta_gtk_widget_get_font_desc (widget, scale, - meta_prefs_get_titlebar_font ()); + if (meta_prefs_get_theme ()) + { + double scale; + + scale = meta_theme_get_title_scale (meta_theme_get_current (), + type, flags); + + font_desc = meta_gtk_widget_get_font_desc (widget, scale, + meta_prefs_get_titlebar_font ()); + } + else + { + font_desc = meta_style_info_create_font_desc (frame->style_info); + meta_frame_style_apply_scale (style, font_desc); + } size = pango_font_description_get_size (font_desc); |