Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance functionality of InnerWindow #5305

Closed
wants to merge 9 commits into from

Conversation

roffe
Copy link
Contributor

@roffe roffe commented Dec 9, 2024

Description:

2 changes:

First:
allow customization of button location on InnerWindow via InnerWindow.ButtonAlignment

The widget.ButtonAlign constant is used to configure

ButtonAlignment specifies where the window buttons (close, minimize, maximize) should be placed.
The default is widget.ButtonAlignCenter which will auto select based on the OS.
- On Darwin this will be `widget.ButtonAlignLeading`
- On all other OS this will be `widget.ButtonAlignTrailing`

Second
Added Title() string function to retrieve the title of the current inner window

@coveralls
Copy link

coveralls commented Dec 9, 2024

Coverage Status

coverage: 60.012% (+0.04%) from 59.974%
when pulling b9ca162 on roffe:roffe/multiwindow
into a1d708d on fyne-io:develop.

@Jacalz
Copy link
Member

Jacalz commented Dec 9, 2024

Would it make sense to default to buttons on the right side on Windows and Linux? Windows seems like a rather simple choice but Linux has more customisation of course. However, with all the major Linux vendors distributions like Ubuntu and Fedora defaulting to the right side it seems like a sensible choice?

@roffe
Copy link
Contributor Author

roffe commented Dec 9, 2024

that should do it

@andydotxyz
Copy link
Member

Would it be OK to re-use the existing button align consts?

Copy link
Member

@andydotxyz andydotxyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice addition, thanks

All new APIs need the:

//
// Since: 2.6

lines at the end of their documentation

@Jacalz
Copy link
Member

Jacalz commented Dec 10, 2024

For the record: I realised that my comment about Fedora defaulting to buttons on the right side is technically incorrect, at least on Gnome. Anyhow, Ubuntu is the largest and they default to the right like most other :)

Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Some minor comments inline :)

container/innerwindow.go Outdated Show resolved Hide resolved
container/innerwindow.go Outdated Show resolved Hide resolved
Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I realised that I missed some things in my last review

container/innerwindow.go Outdated Show resolved Hide resolved
container/innerwindow.go Outdated Show resolved Hide resolved
@roffe roffe changed the title allow customization of button location on InnerWindow enhance functionality of InnerWindow Dec 11, 2024
@roffe roffe closed this by deleting the head repository Dec 12, 2024
@andydotxyz
Copy link
Member

Hi @roffe, it's not clear why this was deleted, was it a mistake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants