💾 Archived View for gemlog.blue › users › sloum › 1594013994.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2020-09-24)

-=-=-=-=-=-=-

I have spent the last two days playing around with the fyne[1] GUI toolkit for golang. My wife had expressed interest in gemini but didnt want to use a terminal client. I tried to build Kristall and Castor on her system, but for various reasons neither built. So I thought I'd just built something I know would work and I could just give her a binary to run. I had looked at golang GUI toolkits before and was underwhelmed. It is mostly dominated by webview stuff... which I do not really want. So I figured I would play with GTK bindings, but was not enthused. There are some tcl/tk bindings and I am used to Python's tkinter package so that seemed like maybe an option even if it is a little dated. In the end I tried out fyne, since it was a golang specific option that can crosscompile well without the need for the host system installing a ton of libs.

Fyne is not ready for production work it seems. There are a decent number of widgets and I actually really like the workflow, but there are only VERY limited theming options and the built in themes are UGLY. The ability to control font sizes and fonts is also extremely limited. I believe there is a way to do it, but it requires building a lot of custom widgets and getting weird with things. Their own docs recommend against it. So I proceeded with the ugly styling and got things to a point where I could load and parse a hard coded gemini document. Display is a problem though: there is not a multiline text display option. There are labels and there are entries. Labels seem to make scroll containers scroll extremely slowly and do not seem designed for large blocks of text. I was able to get them to wrap and sit in a scroll container though. Entries are great, but the text is editable. If I disable the entry I can remove editability but the color gets dimmed substantially (since it is 'disabled') and there is not an easy way to set the color (again, I can extend the widget and override some defaults, but it gets messier than I'd like).

The next issue was links. I parsed them and because there is no concept of a text pad or the like that you can send arbitrarily styled text to (at least not with a normal font, they have text-grid... but it serves a different purpose). I extended their hyperlink class in order to get a hyperlink with a custom handler (the default is to just open in a web browser... but since I'm building a browser that wouldnt do, at least not for gemini:// links).

I was able to make headings bold, but not change sizes. Lists and blockquote had similar issues. It is possible I am just not udnerstanding their widgets well enough, but not example programs or other projects using the library have big blocks of text, so it seems this just isnt one of their major use cases.

In the end I abandoned the project. I am still palying around with fyne a bit, but I dont know that I'll really use it for anything. Godoc and their github source were useful for figuring things out, but the tutorials ont heir website were garbage and seem outdated. If anyone reading this tries out fine, be sure to drop me a line about your experience. I'd like to see it improve as I really do like the way they think out their abstractions... it just isnt mature enough yet from a usability standpoint.

- - -

1. fyne