summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2001-11-15 21:12:27 +0000
committerOwen Taylor <otaylor@src.gnome.org>2001-11-15 21:12:27 +0000
commit91a34f5d56b7fdde9c3dc500bbec24af474e8a63 (patch)
tree9cf329bcb6f14710ea8eb4a25072b1fe3ad6f4da
parentb27345fe2cf7277bb3483d06651c8bb6820003ec (diff)
downloadgtk+-91a34f5d56b7fdde9c3dc500bbec24af474e8a63.tar.gz
Some small drawing fixes for scroll arrows.
Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
-rw-r--r--ChangeLog4
-rw-r--r--ChangeLog.pre-2-04
-rw-r--r--ChangeLog.pre-2-104
-rw-r--r--ChangeLog.pre-2-24
-rw-r--r--ChangeLog.pre-2-44
-rw-r--r--ChangeLog.pre-2-64
-rw-r--r--ChangeLog.pre-2-84
-rw-r--r--gtk/gtknotebook.c31
8 files changed, 37 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 91e0160dd6..decbb736cf 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,7 @@
+Thu Nov 15 16:07:42 2001 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtknotebook.c: Some small drawing fixes for scroll arrows.
+
Thu Nov 15 14:19:34 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Cal
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index bac4ff9ee2..ca9b40f3ae 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -699,6 +699,7 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
GdkRectangle *rectangle)
{
GtkWidget *widget = GTK_WIDGET (notebook);
+ gint border_width = GTK_CONTAINER (notebook)->border_width;
if (notebook->show_tabs && notebook->children)
{
@@ -706,24 +707,24 @@ gtk_notebook_get_event_window_position (GtkNotebook *notebook,
{
GtkNotebookPage *page = notebook->children->data;
- rectangle->x = widget->allocation.x;
- rectangle->y = widget->allocation.y;
+ rectangle->x = widget->allocation.x + border_width;
+ rectangle->y = widget->allocation.y + border_width;
switch (notebook->tab_pos)
{
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
- rectangle->width = widget->allocation.width;
+ rectangle->width = widget->allocation.width - 2 * border_width;
rectangle->height = page->requisition.height;
if (notebook->tab_pos == GTK_POS_BOTTOM)
- rectangle->y += widget->allocation.height - rectangle->height;
+ rectangle->y += widget->allocation.height - 2 * border_width - rectangle->height;
break;
case GTK_POS_LEFT:
case GTK_POS_RIGHT:
rectangle->width = page->requisition.width;
- rectangle->height = widget->allocation.height;
+ rectangle->height = widget->allocation.height - 2 * border_width;
if (notebook->tab_pos == GTK_POS_RIGHT)
- rectangle->x += widget->allocation.width - rectangle->width;
+ rectangle->x += widget->allocation.width - 2 * border_width - rectangle->width;
break;
}
}
@@ -1246,29 +1247,15 @@ gtk_notebook_get_arrow_rect (GtkNotebook *notebook,
switch (notebook->tab_pos)
{
case GTK_POS_LEFT:
- rectangle->x = event_window_pos.x + (event_window_pos.width - rectangle->width) / 2;
- break;
case GTK_POS_RIGHT:
- rectangle->x = event_window_pos.x + event_window_pos.width - (event_window_pos.width - rectangle->width) / 2;
+ rectangle->x = event_window_pos.x + (event_window_pos.width - rectangle->width) / 2;
+ rectangle->y = event_window_pos.y + event_window_pos.height - rectangle->height;
break;
case GTK_POS_TOP:
case GTK_POS_BOTTOM:
rectangle->x = event_window_pos.x + event_window_pos.width - rectangle->width;
- break;
- }
-
- switch (notebook->tab_pos)
- {
- case GTK_POS_LEFT:
- case GTK_POS_RIGHT:
- rectangle->y = event_window_pos.y + event_window_pos.height - rectangle->height;
- break;
- case GTK_POS_TOP:
rectangle->y = event_window_pos.y + (event_window_pos.height - rectangle->height) / 2;
break;
- case GTK_POS_BOTTOM:
- rectangle->y = event_window_pos.y + event_window_pos.height - (event_window_pos.height - rectangle->height) / 2;
- break;
}
}
}