Remove usage of meta_rect()

This was just of the form

  MetaRectangle r = meta_rect (x, y, w, h);

But it was now superfluous in a couple of cases where we could
just use the GdkRectangle that we already had (i.e. without
having to create a new MetaRectangle), and in another
case where all fields were set to zero.

And lo and behold, we actually don't need any meta_rectangle_*()
functions in the theme code.
This commit is contained in:
Federico Mena Quintero
2010-06-10 15:17:31 -05:00
parent a56ab0ab98
commit 2a2795fe6e
2 changed files with 8 additions and 9 deletions

View File

@@ -1609,8 +1609,12 @@ check_expression (PosToken *tokens,
* it's possible we should instead guarantee that widths and heights
* are at least 1.
*/
env.rect = meta_rect (0, 0, 0, 0);
env.rect.x = 0;
env.rect.y = 0;
env.rect.width = 0;
env.rect.height = 0;
if (has_object)
{
env.object_width = 0;

View File

@@ -4525,15 +4525,13 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
if (op_list)
{
GdkRectangle m_rect;
m_rect = meta_rect (rect.x, rect.y, rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
widget,
drawable,
&combined_clip,
&draw_info,
m_rect);
rect);
}
}
@@ -4567,16 +4565,13 @@ meta_frame_style_draw_with_style (MetaFrameStyle *style,
if (op_list)
{
GdkRectangle m_rect;
m_rect = meta_rect (rect.x, rect.y,
rect.width, rect.height);
meta_draw_op_list_draw_with_style (op_list,
style_gtk,
widget,
drawable,
&combined_clip,
&draw_info,
m_rect);
rect);
}
}