mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-05 16:20:10 +00:00
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)
This commit is contained in:
parent
018c353d0b
commit
7fdd482866
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@ -1,3 +1,8 @@
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user