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 a lower-level EditableText widget #4854

Open
2 tasks done
dweymouth opened this issue May 19, 2024 · 3 comments
Open
2 tasks done

Add a lower-level EditableText widget #4854

dweymouth opened this issue May 19, 2024 · 3 comments
Labels
Design Requires some visual design process future Features that might take a while to be sheduled

Comments

@dweymouth
Copy link
Contributor

dweymouth commented May 19, 2024

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

I was looking at the recent Golang reddit post about a Gio-based Postman clone, and OP had mentioned that Gio gave more freedom for designing custom components than Fyne. I took a look at the screenshots and one thing that stood out was the URL bar, with the method selector (GET/POST/etc) - kind of like an Entry with a Select integrated on the left hand side.

This would indeed be a hard/impossible component to build in Fyne, because canvas.Text is too low-level to use as a primitive for that type of component. But if there were a widget (or an option in Entry) to not show the border, but handle everything else editing-related (cursor, selection, etc), you could nest that into a custom widget with the select-like dropdown and drawing a border around it all yourself.

Is it possible to construct a solution with the existing API?

No, other than basically rewriting all of Entry

Describe the solution you'd like to see.

described above

@dweymouth dweymouth added future Features that might take a while to be sheduled Design Requires some visual design process labels May 19, 2024
@andydotxyz
Copy link
Member

The border colour is set by the theme and with 2.5 the themeoverride makes this possible, I think this should be sufficient.
As our widgets are a standard implementation and designed to be consistent this seems an appropriate balance.

@andydotxyz
Copy link
Member

Alternatively a lower level "editable text" component might complement the existing widgets which could be embedded in different scenarios as you indicate would be helpful. There is a lot of functionality in Entry that does not relate to the basic functionality of display and edit text (validation, password etc).

@dweymouth dweymouth changed the title Add an option (or a separate widget) for Entry without borders Add a lower-level EditableText widget May 20, 2024
@dweymouth
Copy link
Contributor Author

I like the idea of an "EditableText" widget. Could be even used in the case where people want a selectable/copyable label for example. Also as a component to build up something like a custom text editor with line number support, etc. Would be a good thing to add at some point in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Requires some visual design process future Features that might take a while to be sheduled
Projects
None yet
Development

No branches or pull requests

2 participants