mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
ui: Remove meta_ui_theme_get_frame_borders
The function is easily replaced, and also becomes more correct as different window types may have different extents.
This commit is contained in:
parent
865b9df9a9
commit
8f789a8fad
@ -4385,9 +4385,8 @@ process_request_frame_extents (MetaDisplay *display,
|
||||
}
|
||||
|
||||
/* Return estimated frame extents for a normal window. */
|
||||
meta_ui_theme_get_frame_borders (screen->ui,
|
||||
META_FRAME_TYPE_NORMAL,
|
||||
0,
|
||||
meta_ui_get_frame_borders (screen->ui,
|
||||
xwindow,
|
||||
&borders);
|
||||
data[0] = borders.visible.left;
|
||||
data[1] = borders.visible.right;
|
||||
|
37
src/ui/ui.c
37
src/ui/ui.c
@ -706,43 +706,6 @@ meta_text_property_to_utf8 (Display *xdisplay,
|
||||
return retval;
|
||||
}
|
||||
|
||||
void
|
||||
meta_ui_theme_get_frame_borders (MetaUI *ui,
|
||||
MetaFrameType type,
|
||||
MetaFrameFlags flags,
|
||||
MetaFrameBorders *borders)
|
||||
{
|
||||
int text_height;
|
||||
GtkStyleContext *style = NULL;
|
||||
PangoContext *context;
|
||||
const PangoFontDescription *font_desc;
|
||||
|
||||
if (meta_ui_have_a_theme ())
|
||||
{
|
||||
context = gtk_widget_get_pango_context (GTK_WIDGET (ui->frames));
|
||||
font_desc = meta_prefs_get_titlebar_font ();
|
||||
|
||||
if (!font_desc)
|
||||
{
|
||||
style = gtk_style_context_new ();
|
||||
font_desc = gtk_style_context_get_font (style, 0);
|
||||
}
|
||||
|
||||
text_height = meta_pango_font_desc_get_text_height (font_desc, context);
|
||||
|
||||
meta_theme_get_frame_borders (meta_theme_get_current (),
|
||||
type, text_height, flags,
|
||||
borders);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_frame_borders_clear (borders);
|
||||
}
|
||||
|
||||
if (style != NULL)
|
||||
g_object_unref (style);
|
||||
}
|
||||
|
||||
void
|
||||
meta_ui_set_current_theme (const char *name,
|
||||
gboolean force_reload)
|
||||
|
@ -57,10 +57,6 @@ MetaUI* meta_ui_new (Display *xdisplay,
|
||||
Screen *screen);
|
||||
void meta_ui_free (MetaUI *ui);
|
||||
|
||||
void meta_ui_theme_get_frame_borders (MetaUI *ui,
|
||||
MetaFrameType type,
|
||||
MetaFrameFlags flags,
|
||||
MetaFrameBorders *borders);
|
||||
void meta_ui_get_frame_borders (MetaUI *ui,
|
||||
Window frame_xwindow,
|
||||
MetaFrameBorders *borders);
|
||||
|
Loading…
Reference in New Issue
Block a user