Commit 7fdd4828 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

Make accel labels ellipsize correctly. (#151559, Christian Persch)

Wed Sep  1 02:38:48 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make
	accel labels ellipsize correctly.  (#151559, Christian Persch)
parent 018c353d
Wed Sep 1 02:38:48 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make
accel labels ellipsize correctly. (#151559, Christian Persch)
Wed Sep 1 00:55:56 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkimage.c (gtk_image_clear): Don't leak the iter
......
Wed Sep 1 02:38:48 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make
accel labels ellipsize correctly. (#151559, Christian Persch)
Wed Sep 1 00:55:56 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkimage.c (gtk_image_clear): Don't leak the iter
......
Wed Sep 1 02:38:48 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make
accel labels ellipsize correctly. (#151559, Christian Persch)
Wed Sep 1 00:55:56 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkimage.c (gtk_image_clear): Don't leak the iter
......
Wed Sep 1 02:38:48 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkaccellabel.c (gtk_accel_label_expose_event): Make
accel labels ellipsize correctly. (#151559, Christian Persch)
Wed Sep 1 00:55:56 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkimage.c (gtk_image_clear): Don't leak the iter
......
......@@ -320,6 +320,7 @@ gtk_accel_label_expose_event (GtkWidget *widget,
{
PangoLayout *label_layout;
PangoLayout *accel_layout;
GtkLabel *label = GTK_LABEL (widget);
gint x;
gint y;
......@@ -327,11 +328,20 @@ gtk_accel_label_expose_event (GtkWidget *widget,
if (direction == GTK_TEXT_DIR_RTL)
widget->allocation.x += ac_width;
widget->allocation.width -= ac_width;
if (gtk_label_get_ellipsize (label))
pango_layout_set_width (label->layout,
pango_layout_get_width (label->layout)
- ac_width * PANGO_SCALE);
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (direction == GTK_TEXT_DIR_RTL)
widget->allocation.x -= ac_width;
widget->allocation.width += ac_width;
if (gtk_label_get_ellipsize (label))
pango_layout_set_width (label->layout,
pango_layout_get_width (label->layout)
+ ac_width * PANGO_SCALE);
if (direction == GTK_TEXT_DIR_RTL)
x = widget->allocation.x + misc->xpad;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment