msw-engine: Remove sanitize_size code

It's not needed with the new APIs
This commit is contained in:
Benjamin Otte 2010-09-20 16:36:25 +02:00
parent f5ad38fdc4
commit c5d309e596

View File

@ -873,28 +873,6 @@ setup_system_styles (GtkStyle *style)
} }
} }
static gboolean
sanitize_size (GdkWindow *window, gint *width, gint *height)
{
gboolean set_bg = FALSE;
if ((*width == -1) && (*height == -1))
{
set_bg = GDK_IS_WINDOW (window);
gdk_drawable_get_size (window, width, height);
}
else if (*width == -1)
{
gdk_drawable_get_size (window, width, NULL);
}
else if (*height == -1)
{
gdk_drawable_get_size (window, NULL, height);
}
return set_bg;
}
static XpThemeElement static XpThemeElement
map_gtk_progress_bar_to_xp (GtkProgressBar *progress_bar, gboolean trough) map_gtk_progress_bar_to_xp (GtkProgressBar *progress_bar, gboolean trough)
{ {
@ -1366,8 +1344,6 @@ draw_arrow (GtkStyle *style,
name = gtk_widget_get_name (widget); name = gtk_widget_get_name (widget);
sanitize_size (window, &width, &height);
if (GTK_IS_ARROW (widget) && is_combo_box_child (widget) && xp_theme_is_active ()) if (GTK_IS_ARROW (widget) && is_combo_box_child (widget) && xp_theme_is_active ())
return; return;
@ -1452,8 +1428,6 @@ draw_arrow (GtkStyle *style,
if (widget) if (widget)
{ {
sanitize_size (window, &width, &height);
dc = get_window_dc (style, window, state, &dc_info, dc = get_window_dc (style, window, state, &dc_info,
box_x, box_y, box_width, box_height, &rect); box_x, box_y, box_width, box_height, &rect);
DrawFrameControl (dc, &rect, DFC_SCROLL, DrawFrameControl (dc, &rect, DFC_SCROLL,
@ -2028,7 +2002,6 @@ draw_box (GtkStyle *style,
RECT rect; RECT rect;
XpDCInfo dc_info; XpDCInfo dc_info;
sanitize_size (window, &width, &height);
dc = get_window_dc (style, window, state_type, &dc_info, x, y, width, height, &rect); dc = get_window_dc (style, window, state_type, &dc_info, x, y, width, height, &rect);
SetTextColor (dc, GetSysColor (COLOR_3DHILIGHT)); SetTextColor (dc, GetSysColor (COLOR_3DHILIGHT));
@ -2104,7 +2077,6 @@ draw_box (GtkStyle *style,
|| strcmp (detail, "toolbar") == 0 || strcmp (detail, "toolbar") == 0
|| strcmp (detail, "menubar") == 0)) || strcmp (detail, "menubar") == 0))
{ {
sanitize_size (window, &width, &height);
if (xp_theme_draw (window, XP_THEME_ELEMENT_REBAR, if (xp_theme_draw (window, XP_THEME_ELEMENT_REBAR,
style, x, y, width, height, state_type, area)) style, x, y, width, height, state_type, area))
{ {
@ -2176,8 +2148,6 @@ draw_box (GtkStyle *style,
option_menu_get_props (widget, &indicator_size, &indicator_spacing); option_menu_get_props (widget, &indicator_size, &indicator_spacing);
sanitize_size (window, &width, &height);
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
{ {
vline_x = vline_x =
@ -2932,8 +2902,6 @@ draw_shadow (GtkStyle *style,
HGDIOBJ old_pen = NULL; HGDIOBJ old_pen = NULL;
GtkPositionType pos; GtkPositionType pos;
sanitize_size (window, &width, &height);
if (is_handlebox) if (is_handlebox)
{ {
pos = gtk_handle_box_get_handle_position (GTK_HANDLE_BOX (widget)); pos = gtk_handle_box_get_handle_position (GTK_HANDLE_BOX (widget));
@ -3221,8 +3189,6 @@ draw_handle (GtkStyle *style,
{ {
XpThemeElement hndl; XpThemeElement hndl;
sanitize_size (window, &width, &height);
if (GTK_IS_HANDLE_BOX (widget)) if (GTK_IS_HANDLE_BOX (widget))
{ {
GtkPositionType pos; GtkPositionType pos;
@ -3277,8 +3243,6 @@ draw_handle (GtkStyle *style,
GdkColor *light, *dark, *shadow; GdkColor *light, *dark, *shadow;
GdkRectangle dest; GdkRectangle dest;
sanitize_size (window, &width, &height);
gtk_paint_box (style, window, state_type, shadow_type, area, gtk_paint_box (style, window, state_type, shadow_type, area,
widget, detail, x, y, width, height); widget, detail, x, y, width, height);