[epiphany-extensions/tabs-reloaded: 14/16] Always render the title from the top row onwards
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [epiphany-extensions/tabs-reloaded: 14/16] Always render the title from the top row onwards
- Date: Wed, 16 Dec 2009 16:51:39 +0000 (UTC)
commit fc888964b4ac6980ce35ad9e899dbcc95693daeb
Author: Benjamin Otte <otte gnome org>
Date: Sun Aug 23 15:03:00 2009 +0200
Always render the title from the top row onwards
extensions/tabs-reloaded/ephy-cell-renderer-tab.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/extensions/tabs-reloaded/ephy-cell-renderer-tab.c b/extensions/tabs-reloaded/ephy-cell-renderer-tab.c
index 8b8e3c6..55087cb 100644
--- a/extensions/tabs-reloaded/ephy-cell-renderer-tab.c
+++ b/extensions/tabs-reloaded/ephy-cell-renderer-tab.c
@@ -208,11 +208,14 @@ ephy_cell_renderer_tab_render (GtkCellRenderer *cell,
layout = gtk_widget_create_pango_layout (widget,
ephy_web_view_get_title (view));
pango_layout_set_width (layout, width * PANGO_SCALE);
- if (pango_layout_get_line_count (layout) >= n_columns)
- {
- if (ephy_web_view_get_icon (view))
- pango_layout_set_indent (layout, icon_width * PANGO_SCALE);
- }
+ if (ephy_web_view_get_icon (view))
+ pango_layout_set_indent (layout, icon_width * PANGO_SCALE);
+ /*
+ * If wrapping words is not enough, wrap chars instead.
+ * This way, as much title text as possible is visible.
+ */
+ if (pango_layout_get_line_count (layout) > n_columns)
+ pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
pango_layout_set_height (layout, -(int)n_columns);
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
gtk_paint_layout (widget->style,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]