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

Add more styles and events for the button #2077

Closed
ghost opened this issue Aug 12, 2023 · 2 comments
Closed

Add more styles and events for the button #2077

ghost opened this issue Aug 12, 2023 · 2 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@ghost
Copy link

ghost commented Aug 12, 2023

What is the problem or limitation you are having?

Currently it seems that toga on Android platform could not support multi-windows. And it is said that the OptionContainer is not compatible with mobile OSs. It limits the separation of different functions to a large extent. It is neither intuitive nor beautiful enough to distinguish different function regions in a way of using buttons with simple color or text style distinctions

Describe the solution you'd like

In order to enhance user experience and consider the current available widgets, I think the coordination between buttons and boxes can realize the relatively similar effect of the tab. However, the current button style is not enough to satisfy the modern UI design for applications.

Describe alternatives you've considered

I suggest that the button should add the following styles and events. The suggestion is also useful to other widgets but such functions working on the button is obviously more urgent and important.

  1. Add the underline style of the text.
  2. Hide the border (someone has already submitted) or further specify which sides should be hidden. Or in a different way, add an image button (someone has already submitted as well) or add an on_press event for the label (if so, the border control of the label would become more vital). This also means that it is best to adjust the thickness of the border.
  3. Add an event to response when the mouse cursor stops on the button on desktop OSs and a long press is on it on mobile OSs
  4. If possible, like in HTML, we could finally directly customize any styles of the button by the CSS script. For example, gradient colors and various animation effects.

Additional context

No response

@ghost ghost added the enhancement New features, or improvements to existing features. label Aug 12, 2023
@freakboy3742
Copy link
Member

Closing on the basis that this proposal is fundamentally in conflict with Toga's design philosophy.

In Toga, Buttons are intentionally designed to follow the HIG of the platform they're on. If you don't like the way buttons look on your platform, take that up with your operating system manufacturer, pick a different operating system, or pick a different GUI toolkit.

As for ImageButton - that's a long standing feature request (#774), and one that has been discussed extensively (see the discussions and issues linked to that ticket). It's waiting for someone to implement that feature. The solution will not be to add "on_press" notifications to label.

@freakboy3742 freakboy3742 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2023
@mhsmith
Copy link
Member

mhsmith commented Aug 12, 2023

@leaffeather: If what you're actually trying to achieve is an OptionContainer on Android, then we would probably accept a PR which implements it using a bottom navigation bar. Or tabs would be even better actually, since they allow an unlimited number of items and they don't require icons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

2 participants