Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsukinoko-kun/maxfyne
Add the missing functionality of maximizing the Fyne windows.
https://github.com/tsukinoko-kun/maxfyne
fyne golang golang-library gui ui-library
Last synced: about 2 months ago
JSON representation
Add the missing functionality of maximizing the Fyne windows.
- Host: GitHub
- URL: https://github.com/tsukinoko-kun/maxfyne
- Owner: tsukinoko-kun
- License: mit
- Created: 2024-08-25T13:05:38.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-25T16:07:38.000Z (5 months ago)
- Last Synced: 2024-08-25T17:24:44.118Z (5 months ago)
- Topics: fyne, golang, golang-library, gui, ui-library
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# maxfyne
Add the missing functionality of maximizing the Fyne windows.
## Usage
```go
package mainimport (
"errors"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/widget"
"github.com/tsukinoko-kun/maxfyne"
)func main() {
a := app.New()
w := a.NewWindow("Example")w.SetContent(widget.NewLabel("Hello, World!"))
// Maximize needs to run in a goroutine
// because it may need to wait for the window to be initialized.
go func() {
// you don't need to handle the error if you don't care about it
// if Maximize fails, it will return an error
// no crash will occur
if err := maxfyne.Maximize(w); err != nil {
// maximize failed
if errors.Is(err, maxfyne.NotImplemented) {
// unsupported platform
} else {
// other error
}
}
}()w.ShowAndRun()
}
```## Installation
```shell
go get -u github.com/tsukinoko-kun/maxfyne
```## Works on
- [x] macOS
- [x] Windows
- [ ] Linux (Windows implementation might work here as well)On unsupported platforms, `Maximize` will return `maxfyne.NotImplemented`.