[gtk+/rendering-cleanup-next: 55/153] notebook: Remove useless optimization
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 55/153] notebook: Remove useless optimization
- Date: Sat, 11 Sep 2010 04:56:03 +0000 (UTC)
commit e666c11118d66b7afabc86d379eb09529021f4a5
Author: Benjamin Otte <otte redhat com>
Date: Mon Sep 6 23:07:52 2010 +0200
notebook: Remove useless optimization
It will become especially useless once we draw with Cairo exclusively.
gtk/gtknotebook.c | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 31dc473..867df8a 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -4971,7 +4971,6 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
GdkRectangle *area)
{
GtkNotebookPrivate *priv;
- GdkRectangle child_area;
GdkRectangle page_area;
GtkStateType state_type;
GtkPositionType gap_side;
@@ -4996,22 +4995,19 @@ gtk_notebook_draw_tab (GtkNotebook *notebook,
page_area.width = page->allocation.width;
page_area.height = page->allocation.height;
- if (gdk_rectangle_intersect (&page_area, area, &child_area))
- {
- gap_side = get_tab_gap_pos (notebook);
-
- if (priv->cur_page == page)
- state_type = GTK_STATE_NORMAL;
- else
- state_type = GTK_STATE_ACTIVE;
+ gap_side = get_tab_gap_pos (notebook);
- gtk_paint_extension (gtk_widget_get_style (widget), window,
- state_type, GTK_SHADOW_OUT,
- area, widget, "tab",
- page_area.x, page_area.y,
- page_area.width, page_area.height,
- gap_side);
- }
+ if (priv->cur_page == page)
+ state_type = GTK_STATE_NORMAL;
+ else
+ state_type = GTK_STATE_ACTIVE;
+
+ gtk_paint_extension (gtk_widget_get_style (widget), window,
+ state_type, GTK_SHADOW_OUT,
+ area, widget, "tab",
+ page_area.x, page_area.y,
+ page_area.width, page_area.height,
+ gap_side);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]