fyne-icon-picker

command module
v0.0.0-...-06aaa36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2022 License: MIT Imports: 15 Imported by: 0

README

fyne-icon-picker

An interactive icon picker. The options are generated from those included in the theme package of fyne.

Note: As much as I would enjoy continuing to work on this, it's based on Fyne. Fyne (among others) has made some great strides toward bringing GUI possibilities to Go, but in my opinion it has a long way to go to be production ready.

I'll be excited when that happens, but in the meantime I will be marking this repo as archived. I hope this will help to clarify the level of time I'm willing to devote to Fyne-based projects at this time.

The motivation was two-fold:

  1. I wanted an interactive experience that allowed me to preview the icons I was including in my fyne UI code.
  2. I didn't want such a tool to be hard to use or maintain.

So with a bit of regex the fyne/theme/icons.go file is parsed for icon functions that are then injected into the template generating the generated.go source file... simple.

Initial State

Preview Icons

Click on any icon to show a preview dialog, then choose whether to copy the fyne function name to reference that icon, or hit Cancel to close it.

Icon Preview

Copy Constant Directly

Clicking on the text identifier to the right of an icon will copy the fyne function name directly, and a dialog will confirm that interaction.

Copied!

Regeneration

This assumes that it can find your fyne source download at ~/go/fyne.io/fyne/theme/icons.go. If that's not the case, this will not be able to regenerate from source. I could probably look for an environment defined path, or just pull the latest source file from Github, but this works for now.

# Regenerate the generated.go source file from your local fyne download.
fyne-icon-picker --regenerate

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL