[Github-comments] [geany/geany] improvement: cut down the space wasted in sidebar (#1711)

Matthew Brush notifications at xxxxx
Fri Dec 8 22:51:59 UTC 2017


By not very hard I meant something like this:

```c
gint n = gtk_notebook_get_n_pages(nb);
for (gint i=0; i < n; n++)
{
  GtkWidget *wid = gtk_notebook_get_tab_label(nb,
    gtk_notebook_get_nth_page(i));
  if (GTK_IS_LABEL(wid))
  {
    gtk_label_set_ellipsize(GTK_LABEL(wid), PANGO_ELLIPSIZE_END);
    gtk_label_set_width_chars(GTK_LABEL(wid),
      interface_prefs.sidebar_tab_label_width);
  }
}
```

It should work fine with the normal (UTF-8) text that's in the tab labels, and has no impact on translations. It might need to switch `PANGO_ELLIPSIZE_END` to `_START` if the UI is in right-to-left mode, if GTK+ doesn't already handle this itself, but otherwise it should "just work".

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1711#issuecomment-350392153
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20171208/418db9a3/attachment.html>


More information about the Github-comments mailing list