diff options
author | Philip Chimento <philip@endlessm.com> | 2017-06-12 17:42:18 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2017-06-12 17:42:18 -0700 |
commit | 9daa2a61fd50b32d998581f868fec77c997f026f (patch) | |
tree | 40010488128019cbe35447c1341b33616264f203 /endless/eosattribution.c | |
parent | efc16e54a44cc0ae9470495f9d5047be07af274f (diff) |
attribution: Allow long comments to wrap
We hardcode a wrap width of 600 based on the dialog's default width of
700.
https://phabricator.endlessm.com/T17540
Diffstat (limited to 'endless/eosattribution.c')
-rw-r--r-- | endless/eosattribution.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/endless/eosattribution.c b/endless/eosattribution.c index ca9be4c..f1e4128 100644 --- a/endless/eosattribution.c +++ b/endless/eosattribution.c @@ -10,6 +10,9 @@ #include "eoscellrenderertextlink-private.h" #include "eoslicense.h" +/* less than _CREDITS_DIALOG_DEFAULT_WIDTH from eosapplication.c */ +#define _NOTES_COLUMN_WIDTH 600 + typedef struct { GFile *file; @@ -415,6 +418,11 @@ eos_attribution_init (EosAttribution *self) /* Renderer for general notes */ renderer = gtk_cell_renderer_text_new (); + g_object_set(renderer, + "single-paragraph-mode", TRUE, + "wrap-mode", PANGO_WRAP_WORD_CHAR, + "wrap-width", _NOTES_COLUMN_WIDTH, + NULL); gtk_cell_area_box_pack_start (GTK_CELL_AREA_BOX (area), renderer, FALSE, FALSE, FALSE); gtk_tree_view_column_set_cell_data_func (column, renderer, |