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:
Jasper St. Pierre 2012-04-29 15:15:50 -04:00
parent 865b9df9a9
commit 8f789a8fad
3 changed files with 3 additions and 45 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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);