summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Peters <itp@src.gnome.org>2001-02-11 03:58:55 +0000
committerIan Peters <itp@src.gnome.org>2001-02-11 03:58:55 +0000
commitded7626eeb5c985c2a767ff15e81044142939ce6 (patch)
treebe21d6753684cd0c65b8b5ee77180c0f5631edb2
parent9f8ce5729589d12264ac729b877691f87553bcf0 (diff)
downloadgdk-pixbuf-ded7626eeb5c985c2a767ff15e81044142939ce6.tar.gz
use the font->ascent and ->descent to calculate the requisition height,
* gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the font->ascent and ->descent to calculate the requisition height, rather than the gdk_text_height (gtk_progress_bar_paint): use the font->ascent instead of the gdk_text_height when calculating the vertical offset of the text label on the progress bar. This fixes the baseline of the font on the widget.
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-010
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-210
-rw-r--r--ChangeLog.pre-2-410
-rw-r--r--ChangeLog.pre-2-610
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--gtk/gtkprogressbar.c11
8 files changed, 75 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 0288aba4e..89069b448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 0288aba4e..89069b448 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+2001-02-10 Ian Peters <itp@ximian.com>
+
+ * gtk/gtkprogressbar.c (gtk_progress_bar_size_request): use the
+ font->ascent and ->descent to calculate the requisition height,
+ rather than the gdk_text_height
+ (gtk_progress_bar_paint): use the font->ascent instead of the
+ gdk_text_height when calculating the vertical offset of the text
+ label on the progress bar. This fixes the baseline of the font on
+ the widget.
+
Fri Feb 2 19:21:23 2001 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_propagate_shapes): Surround additional
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 1905f31a8..cee29a1f9 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -373,8 +373,8 @@ gtk_progress_bar_size_request (GtkWidget *widget,
requisition->height = MAX (MIN_HORIZONTAL_BAR_HEIGHT,
2 * widget->style->klass->ythickness + 3 +
- gdk_text_height (widget->style->font,
- buf, strlen (buf)) +
+ widget->style->font->ascent +
+ widget->style->font->descent +
2 * TEXT_SPACING);
g_free (buf);
}
@@ -399,8 +399,8 @@ gtk_progress_bar_size_request (GtkWidget *widget,
requisition->height = MAX (MIN_VERTICAL_BAR_HEIGHT,
2 * widget->style->klass->ythickness + 3 +
- gdk_text_height (widget->style->font,
- buf, strlen (buf)) +
+ widget->style->font->ascent +
+ widget->style->font->descent +
2 * TEXT_SPACING);
g_free (buf);
}
@@ -717,8 +717,7 @@ gtk_progress_bar_paint (GtkProgress *progress)
y = widget->style->font->ascent + 1 +
(widget->allocation.height - 2 * widget->style->klass->ythickness -
- 3 - gdk_text_height (widget->style->font, buf, strlen (buf)))
- * progress->y_align;
+ 3 - widget->style->font->ascent) * progress->y_align;
rect.x = widget->style->klass->xthickness + 1;
rect.y = widget->style->klass->ythickness + 1;