summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gtk/gtklabel.c22
7 files changed, 56 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 720e6ba9f2..b361f4211b 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+Mon Aug 5 17:20:45 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtklabel.c: Patch from Soeren Sandmann
+ to improve GtkLabel behavior when it gets
+ a too small allocation. (Always display the
+ initial portion.) (#71742)
+
Mon Aug 5 17:01:30 2002 Owen Taylor <otaylor@redhat.com>
* gdk/Makefile.am (LDFLAGS): When overriding LDFLAGS,
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 8b9ca6aceb..16912a52ff 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -1648,15 +1648,21 @@ get_layout_location (GtkLabel *label,
xalign = misc->xalign;
else
xalign = 1.0 - misc->xalign;
-
- x = floor (widget->allocation.x + (gint)misc->xpad
- + ((widget->allocation.width - widget->requisition.width) * xalign)
- + 0.5);
-
+
+ x = floor (widget->allocation.x + (gint)misc->xpad +
+ xalign * (widget->allocation.width - widget->requisition.width)
+ + 0.5);
+
+ if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
+ x = MAX (x, widget->allocation.x + misc->xpad);
+ else
+ x = MIN (x,
+ widget->allocation.x + widget->allocation.width -
+ widget->requisition.width - misc->xpad);
+
y = floor (widget->allocation.y + (gint)misc->ypad
- + ((widget->allocation.height - widget->requisition.height) * misc->yalign)
- + 0.5);
-
+ + MAX (((widget->allocation.height - widget->requisition.height) * misc->yalign)
+ + 0.5, 0));
if (xp)
*xp = x;