зеркало из https://github.com/mozilla/gecko-dev.git
Bug 899460 - Remove MOZ_GTK_EXPANDER. r=karlt
This commit is contained in:
Родитель
e11e60ac69
Коммит
b643e53730
|
@ -1765,27 +1765,6 @@ moz_gtk_treeview_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
|||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
static gint
|
||||
moz_gtk_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
GtkExpanderStyle expander_state,
|
||||
GtkTextDirection direction)
|
||||
{
|
||||
GtkStyle *style;
|
||||
GtkStateType state_type = ConvertGtkState(state);
|
||||
|
||||
ensure_expander_widget();
|
||||
gtk_widget_set_direction(gExpanderWidget, direction);
|
||||
|
||||
style = gExpanderWidget->style;
|
||||
|
||||
TSOffsetStyleGCs(style, rect->x, rect->y);
|
||||
gtk_paint_expander(style, drawable, state_type, cliprect, gExpanderWidget, "expander",
|
||||
rect->x + rect->width / 2, rect->y + rect->height / 2, expander_state);
|
||||
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
static gint
|
||||
moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||
|
@ -2969,7 +2948,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
|||
case MOZ_GTK_PROGRESS_CHUNK:
|
||||
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
||||
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
||||
case MOZ_GTK_EXPANDER:
|
||||
case MOZ_GTK_TREEVIEW_EXPANDER:
|
||||
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
||||
case MOZ_GTK_MENUSEPARATOR:
|
||||
|
@ -3256,10 +3234,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
|
|||
return moz_gtk_treeview_expander_paint(drawable, rect, cliprect, state,
|
||||
(GtkExpanderStyle) flags, direction);
|
||||
break;
|
||||
case MOZ_GTK_EXPANDER:
|
||||
return moz_gtk_expander_paint(drawable, rect, cliprect, state,
|
||||
(GtkExpanderStyle) flags, direction);
|
||||
break;
|
||||
case MOZ_GTK_ENTRY:
|
||||
ensure_entry_widget();
|
||||
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
|
||||
|
|
|
@ -1610,28 +1610,6 @@ moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
|||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
static gint
|
||||
moz_gtk_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
||||
GtkWidgetState* state,
|
||||
GtkExpanderStyle expander_state,
|
||||
GtkTextDirection direction)
|
||||
{
|
||||
GtkStyleContext *style;
|
||||
|
||||
ensure_expander_widget();
|
||||
gtk_widget_set_direction(gExpanderWidget, direction);
|
||||
|
||||
style = gtk_widget_get_style_context(gExpanderWidget);
|
||||
gtk_style_context_save(style);
|
||||
gtk_style_context_add_class(style, GTK_STYLE_CLASS_EXPANDER);
|
||||
gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state));
|
||||
gtk_render_expander(style, cr,
|
||||
rect->x + rect->width / 2, rect->y + rect->height / 2,
|
||||
rect->width, rect->height);
|
||||
gtk_style_context_restore(style);
|
||||
return MOZ_GTK_SUCCESS;
|
||||
}
|
||||
|
||||
/* See gtk_separator_draw() for reference.
|
||||
*/
|
||||
static gint
|
||||
|
@ -2844,7 +2822,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
|||
case MOZ_GTK_PROGRESS_CHUNK:
|
||||
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
||||
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
||||
case MOZ_GTK_EXPANDER:
|
||||
case MOZ_GTK_TREEVIEW_EXPANDER:
|
||||
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
||||
case MOZ_GTK_MENUSEPARATOR:
|
||||
|
@ -3150,10 +3127,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, cairo_t *cr,
|
|||
return moz_gtk_treeview_expander_paint(cr, rect, state,
|
||||
(GtkExpanderStyle) flags, direction);
|
||||
break;
|
||||
case MOZ_GTK_EXPANDER:
|
||||
return moz_gtk_expander_paint(cr, rect, state,
|
||||
(GtkExpanderStyle) flags, direction);
|
||||
break;
|
||||
case MOZ_GTK_ENTRY:
|
||||
ensure_entry_widget();
|
||||
return moz_gtk_entry_paint(cr, rect, state,
|
||||
|
|
|
@ -161,8 +161,6 @@ typedef enum {
|
|||
MOZ_GTK_TREE_HEADER_SORTARROW,
|
||||
/* Paints an expander for a GtkTreeView */
|
||||
MOZ_GTK_TREEVIEW_EXPANDER,
|
||||
/* Paints a GtkExpander */
|
||||
MOZ_GTK_EXPANDER,
|
||||
/* Paints the background of the menu bar. */
|
||||
MOZ_GTK_MENUBAR,
|
||||
/* Paints the background of menus, context menus. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче