GNOME Bugzilla – Bug 728480
List View in Main Window: title should center vertically
Last modified: 2018-02-05 21:02:27 UTC
Currently, the notes' or notebook's title is at the top of each item in list view, but 'type' 'where' and 'date' are centered vertically.
Created attachment 274643 [details] Title isn't centered in list view
As far as I know bijiben's list view is from libgd directly so a "two line renderer" is used to hold the title of Notes and Notebooks, although the title only uses one line. bijiben/libgd/libgd/gd-main-list-view.c line 123: cell = gd_two_lines_renderer_new (); g_object_set (cell, "xalign", 0.0, "wrap-mode", PANGO_WRAP_WORD_CHAR, "xpad", 12, "text-lines", 2, NULL);
You might update libgd git submodule to check if the bug still applies, some work was done on gd_two_lines_renderer If this does not fix it, gnome-document might have the same bug, too. Since I borrowed its code. https://git.gnome.org/browse/gnome-documents/tree/src/view.js#n263 In such case we need to propose a patch for libgd
The problem still exists after I update the libgd submodule. Yes, gd_two_lines_renderer() does do some work. gnome-documents needs gd_two_lines_renderer() to render two lines, since their documents have both title and author. I think we can leave out gd_two_lines_renderer() and use gtk_cell_renderer_text_new() to write a new one. But gd-main-list-view.c is not part of bijiben, I don't know deal with this.
There's a related bug against GNOME Documents - https://bugzilla.gnome.org/show_bug.cgi?id=723843 Seems like the fix would be the same.
*** Bug 762127 has been marked as a duplicate of this bug. ***
Created attachment 367773 [details] [review] libgd: New version fixes list view Bijiben has their notes' titles decentralized in list view due to an issue in libgd. This commit changes Bijiben code to use a newer libgd commit which addresses that issue.
Review of attachment 367773 [details] [review]: lgtm. This commit fixes the issue. Please commit after the suggested changes: > libgd: New version fixes list view May be you can simply say something like: Update libgd, or libgd: Update to latest commit (or so). > ... decentralized ... This seems to have a different meaning. may be you can simply say "not centered" or so. Sorry for the nitpicks. Thanks for the patch.
Created attachment 367931 [details] [review] libgd: New version fixes list view alignment Bijiben has their notes' titles misaligned in list view due to an issue in libgd. This commit changes Bijiben code to use a newer libgd commit which addresses that issue.
Review of attachment 367773 [details] [review]: I'm not sure why it didn't mark obsolete.
Review of attachment 367931 [details] [review]: >> libgd: New version fixes list view >May be you can simply say something like: Update libgd, or libgd: Update to latest commit (or so). My idea is to make sure what this update is about. >> ... decentralized ... >This seems to have a different meaning. may be you can simply say "not centered" or so. Fixed that, thanks for noticing (Portuguese and English got mixed). >Sorry for the nitpicks. Thanks for the patch. I really like your comments. It improves the code/documentation quality. Thank you!