{"id":20548091,"url":"https://github.com/lusingander/fyne-theme-generator","last_synced_at":"2025-04-14T10:43:25.922Z","repository":{"id":54166215,"uuid":"260640539","full_name":"lusingander/fyne-theme-generator","owner":"lusingander","description":"WYSIWYG theme editor for Fyne 🎨","archived":false,"fork":false,"pushed_at":"2021-09-19T00:41:46.000Z","size":16627,"stargazers_count":149,"open_issues_count":2,"forks_count":17,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-11T11:38:38.208Z","etag":null,"topics":["fyne","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lusingander.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-02T07:58:08.000Z","updated_at":"2025-03-07T03:03:18.000Z","dependencies_parsed_at":"2022-08-13T08:10:21.118Z","dependency_job_id":null,"html_url":"https://github.com/lusingander/fyne-theme-generator","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Ffyne-theme-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Ffyne-theme-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Ffyne-theme-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lusingander%2Ffyne-theme-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lusingander","download_url":"https://codeload.github.com/lusingander/fyne-theme-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248867605,"owners_count":21174748,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fyne","go"],"created_at":"2024-11-16T02:12:01.785Z","updated_at":"2025-04-14T10:43:25.878Z","avatar_url":"https://github.com/lusingander.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/lusingander/fyne-theme-generator)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lusingander/fyne-theme-generator)](https://goreportcard.com/report/github.com/lusingander/fyne-theme-generator)\n![GitHub](https://img.shields.io/github/license/lusingander/fyne-theme-generator)\n\n# fyne-theme-generator\n\nWYSIWYG theme editor for [Fyne](https://fyne.io/)\n\n\u003cimg src=\"./resource/main.gif\" width=700\u003e\n\n## Installation\n\n`go get github.com/lusingander/fyne-theme-generator`\n\n## Usage\n\nYou can change each parameter that can be set as Fyne theme.\n\n\u003cimg src=\"./resource/screenshot.png\" width=700\u003e\n\n### Default themes\n\nYou can choose a new theme from Fine v1.4 or later, or an earlier theme and apply and customize it.\n\n\u003cimg src=\"./resource/theme.gif\" width=600\u003e\n\n### Fonts\n\nYou can also change the font, and export font bundled file.\n\n\u003cimg src=\"./resource/font.gif\" width=600\u003e\n\n### Export\n\nYou can export the theme file as `theme_gen.go` you set.\n\nIf the `Generate font file` is checked, the font file is also exported as `font_gen.go` (It will not be exported if you have not changed any of the fonts).\n\nThe following is an example of the output `theme_gen.go`.\n\n```go\npackage main\n\nimport (\n\t\"image/color\"\n\n\t\"fyne.io/fyne/v2\"\n\t\"fyne.io/fyne/v2/theme\"\n)\n\ntype myTheme struct{}\n\nfunc (myTheme) Color(c fyne.ThemeColorName, v fyne.ThemeVariant) color.Color {\n\tswitch c {\n\tcase theme.ColorNameBackground:\n\t\treturn color.NRGBA{R: 0x30, G: 0x30, B: 0x30, A: 0xff}\n\tcase theme.ColorNameButton:\n\t\treturn color.Alpha16{A: 0x0}\n\tcase theme.ColorNameDisabledButton:\n\t\treturn color.NRGBA{R: 0x26, G: 0x26, B: 0x26, A: 0xff}\n\tcase theme.ColorNameDisabled:\n\t\treturn color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0x42}\n\tcase theme.ColorNameError:\n\t\treturn color.NRGBA{R: 0xf4, G: 0x43, B: 0x36, A: 0xff}\n\tcase theme.ColorNameFocus:\n\t\treturn color.NRGBA{R: 0x21, G: 0x96, B: 0xf3, A: 0x7f}\n\tcase theme.ColorNameForeground:\n\t\treturn color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff}\n\tcase theme.ColorNameHover:\n\t\treturn color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xf}\n\tcase theme.ColorNameInputBackground:\n\t\treturn color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0x19}\n\tcase theme.ColorNamePlaceHolder:\n\t\treturn color.NRGBA{R: 0xb2, G: 0xb2, B: 0xb2, A: 0xff}\n\tcase theme.ColorNamePressed:\n\t\treturn color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0x66}\n\tcase theme.ColorNamePrimary:\n\t\treturn color.NRGBA{R: 0x21, G: 0x96, B: 0xf3, A: 0xff}\n\tcase theme.ColorNameScrollBar:\n\t\treturn color.NRGBA{R: 0x0, G: 0x0, B: 0x0, A: 0x99}\n\tcase theme.ColorNameShadow:\n\t\treturn color.NRGBA{R: 0x0, G: 0x0, B: 0x0, A: 0x66}\n\tdefault:\n\t\treturn theme.DefaultTheme().Color(c, v)\n\t}\n}\n\nfunc (myTheme) Font(s fyne.TextStyle) fyne.Resource {\n\tif s.Monospace {\n\t\treturn theme.DefaultTheme().Font(s)\n\t}\n\tif s.Bold {\n\t\tif s.Italic {\n\t\t\treturn theme.DefaultTheme().Font(s)\n\t\t}\n\t\treturn theme.DefaultTheme().Font(s)\n\t}\n\tif s.Italic {\n\t\treturn theme.DefaultTheme().Font(s)\n\t}\n\treturn theme.DefaultTheme().Font(s)\n}\n\nfunc (myTheme) Icon(n fyne.ThemeIconName) fyne.Resource {\n\treturn theme.DefaultTheme().Icon(n)\n}\n\nfunc (myTheme) Size(s fyne.ThemeSizeName) float32 {\n\tswitch s {\n\tcase theme.SizeNameCaptionText:\n\t\treturn 11\n\tcase theme.SizeNameInlineIcon:\n\t\treturn 20\n\tcase theme.SizeNamePadding:\n\t\treturn 4\n\tcase theme.SizeNameScrollBar:\n\t\treturn 16\n\tcase theme.SizeNameScrollBarSmall:\n\t\treturn 3\n\tcase theme.SizeNameSeparatorThickness:\n\t\treturn 1\n\tcase theme.SizeNameText:\n\t\treturn 14\n\tcase theme.SizeNameInputBorder:\n\t\treturn 2\n\tdefault:\n\t\treturn theme.DefaultTheme().Size(s)\n\t}\n}\n```\n\n## Related projects\n\n- [colorpicker](https://github.com/lusingander/colorpicker)\n  - Color picker component for Fyne\n- [fyne-credits-generator](https://github.com/lusingander/fyne-credits-generator)\n  - Automatically generate credits(licenses) window for the Fyne application\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Ffyne-theme-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flusingander%2Ffyne-theme-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flusingander%2Ffyne-theme-generator/lists"}