Fix bug #150790:
2004-10-01 Matthias Clasen <mclasen@redhat.com> Fix bug #150790: * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): Fix the calculation of x_offset when ellipsized and in RTL mode. (gtk_cell_renderer_text_render): Fix the calculation of the layout width when ellipsized.
This commit is contained in:
parent
8439956a9c
commit
a263e05646
@ -1,3 +1,12 @@
|
|||||||
|
2004-10-01 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Fix bug #150790:
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): Fix the
|
||||||
|
calculation of x_offset when ellipsized and in RTL mode.
|
||||||
|
(gtk_cell_renderer_text_render): Fix the calculation of the layout
|
||||||
|
width when ellipsized.
|
||||||
|
|
||||||
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-10-01 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Fix bug #150790:
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): Fix the
|
||||||
|
calculation of x_offset when ellipsized and in RTL mode.
|
||||||
|
(gtk_cell_renderer_text_render): Fix the calculation of the layout
|
||||||
|
width when ellipsized.
|
||||||
|
|
||||||
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-10-01 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Fix bug #150790:
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): Fix the
|
||||||
|
calculation of x_offset when ellipsized and in RTL mode.
|
||||||
|
(gtk_cell_renderer_text_render): Fix the calculation of the layout
|
||||||
|
width when ellipsized.
|
||||||
|
|
||||||
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2004-10-01 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Fix bug #150790:
|
||||||
|
|
||||||
|
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_get_size): Fix the
|
||||||
|
calculation of x_offset when ellipsized and in RTL mode.
|
||||||
|
(gtk_cell_renderer_text_render): Fix the calculation of the layout
|
||||||
|
width when ellipsized.
|
||||||
|
|
||||||
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
2004-10-01 Tor Lillqvist <tml@iki.fi>
|
||||||
|
|
||||||
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
* gdk/win32/gdkglobals-win32.c: Set _gdk_input_ignore_wintab to
|
||||||
|
@ -1412,10 +1412,12 @@ gtk_cell_renderer_text_get_size (GtkCellRenderer *cell,
|
|||||||
{
|
{
|
||||||
if (x_offset)
|
if (x_offset)
|
||||||
{
|
{
|
||||||
*x_offset = ((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ?
|
|
||||||
(1.0 - cell->xalign) : cell->xalign) * (cell_area->width - rect.width - (2 * cell->xpad));
|
|
||||||
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
||||||
*x_offset -= rect.width;
|
*x_offset = (1.0 - cell->xalign) * (cell_area->width - rect.width - (2 * cell->xpad));
|
||||||
|
else
|
||||||
|
*x_offset = cell->xalign * (cell_area->width - rect.width - (2 * cell->xpad));
|
||||||
|
|
||||||
|
if (priv->ellipsize)
|
||||||
*x_offset = MAX(*x_offset, 0);
|
*x_offset = MAX(*x_offset, 0);
|
||||||
}
|
}
|
||||||
if (y_offset)
|
if (y_offset)
|
||||||
@ -1503,7 +1505,8 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (priv->ellipsize)
|
if (priv->ellipsize)
|
||||||
pango_layout_set_width (layout, cell_area->width * PANGO_SCALE);
|
pango_layout_set_width (layout,
|
||||||
|
(cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE);
|
||||||
else
|
else
|
||||||
pango_layout_set_width (layout, -1);
|
pango_layout_set_width (layout, -1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user