jhass / crystal-gobject

gobject-introspection for Crystal
BSD 3-Clause "New" or "Revised" License
127 stars 13 forks source link

Keep LICENSE lines 80 columns wide #63

Closed hugopl closed 4 years ago

hugopl commented 4 years ago

So the license can be show in UI using elorest/compiled_license shard.

jhass commented 4 years ago

Eh, I'd argue whatever needs it 80 columns wide should reformat it. But whatever, doesn't harm I guess.

hugopl commented 4 years ago

The problem is seem when using:

Gtk::AboutDialog.new(license: Compiled::License.display)

This Compiled::License is from the shard that grab all LICENSE files. GtkAboutDialog show the licenses without wordwrap, so the window get larger than the entire desktop. I missed this info on the report, sorry :-).

jhass commented 4 years ago

yeah, so Compiled::License.display.gsub(/(?<=^[^\n]{80})/, "\n") or something like that.

hugopl commented 4 years ago

yeah, so Compiled::License.display.gsub(/(?<=^[^\n]{80})/, "\n") or something like that.

But this string processing would waste several unnoticeable nano seconds on a code path that is rarely executed :-P, unless using a macro to process the License.display macro result.

jhass commented 4 years ago

Just saying I wish you a lot of fun with this kind of pull request to all the things your app may ever depend on :P