-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow application to set default view (list/grid) of file dialog before showing it #4595
Comments
It doesn't need to be SetDefaultView, just SetView would work. |
I would prefer if I could already provide the appropriate view for my usecase from the beginning, as the current default view (grid) currently is a problem for my users. Telling them how they can change it would require an additional documentation step, which is why I would prefer that the dialog is opened with the list view already from the beginning. If you agree that this could be a useful feature I can look into the implementation, if its fine for you. |
I'm curious to understand why the grid view is a problem, but it seems like you have a real use-case there. |
The filenames my users are using are quite long (30+ characters). |
…rence view & default view Switching GridView & ListView has the benefit that users who are already have their preferences set to ListView will be shown the ListView (index = 1), for users who used the old GridView (index = 0), now the defaultView is used, which translates to GridView.
…rence view & default view Switching GridView & ListView has the benefit that users who are already have their preferences set to ListView will be shown the ListView (index = 1), for users who used the old GridView (index = 0), now the defaultView is used, which translates to GridView.
Allowing apps to specify their preferred file dialog layout
Thanks for your work @maruu this is now on develop branch ready for v2.5.0 |
Checklist
Is your feature request related to a problem?
I think the issue has already been described here: #2165
I essentially have the same pains, but instead of having to click on the list-view toggle button all of the time, I would like to show the dialogs with that view by default.
Is it possible to construct a solution with the existing API?
It might be able to get a reference to the button, as is done in the tests, but I would prefer a more clear API.
https://github.com/fyne-io/fyne/pull/2251/files#diff-3144205fac6ab76f332735320fee204ddb6963bcc76a40684806537d5a999534R441
Describe the solution you'd like to see.
When creating a dialog, like
dialog.NewFileOpen()
I would propose to have a method on the returned object likeSetDefaultView()
which lets me select whether to use theGrid
orList
view. I would expect that this is set before theShow()
method is called.With some help from you (i.e. drafting the solution together), I would be happy to help implement it.
The text was updated successfully, but these errors were encountered: