Skip to content

Commit

Permalink
Update readme (fluxxcode#176)
Browse files Browse the repository at this point in the history
* Update README.md

* Update changelog
  • Loading branch information
fluxxcode authored Oct 25, 2024
1 parent 0fe067b commit 0c585c1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
- Made default egui fonts an optional feature `default_fonts` [#163](https://github.com/fluxxcode/egui-file-dialog/pull/163) (thanks [@StarStarJ](https://github.com/StarStarJ)!)
- Filter directory when loading to improve performance [#169](https://github.com/fluxxcode/egui-file-dialog/pull/169)

### 📚 Documentation
- Updated `README.md` to include latest features [#176](https://github.com/fluxxcode/egui-file-dialog/pull/176)

## 2024-10-01 - v0.7.0 - egui update and QoL changes
### 🚨 Breaking Changes
- Updated `egui` from version `0.28.0` to version `0.29.1` [#155](https://github.com/fluxxcode/egui-file-dialog/pull/155) and [#157](https://github.com/fluxxcode/egui-file-dialog/pull/157) (thanks [@crumblingstatue](https://github.com/crumblingstatue)!)
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ The latest changes included in the next release can be found in the [CHANGELOG.m
- Create a new folder
- Keyboard navigation
- Option to show or hide hidden files and folders
- Option to show or hide system files
- Navigation buttons to open the parent or previous directories
- Search for items in a directory
- Add file filters the user can select from a dropdown
Expand All @@ -49,9 +50,10 @@ The latest changes included in the next release can be found in the [CHANGELOG.m
- Customize file and folder icons
- Add custom quick access sections to the left sidebar
- Customize keybindings used by the file dialog
- Add a right panel with custom UI using

## Example
Detailed examples that can be run can be found in the [examples](https://github.com/fluxxcode/egui-file-dialog/tree/master/examples) folder.
Detailed examples that can be run can be found in the [examples](https://github.com/fluxxcode/egui-file-dialog/tree/develop/examples) folder.

The following example shows the basic use of the file dialog with [eframe](https://github.com/emilk/egui/tree/master/crates/eframe) to select a file.

Expand Down Expand Up @@ -140,6 +142,7 @@ A few highlights of the customization are listed below. For all possible customi
- Update the text labels that the dialog uses. See [Multilingual support](#multilingual-support)
- Customize file and folder icons using `FileDialog::set_file_icon` (Currently only unicode is supported)
- Customize keybindings used by the file dialog using `FileDialog::keybindings`. See [Keybindings](#keybindings)
- Add a right panel with custom UI using `FileDialog::update_with_right_panel_ui`

Since the dialog uses the egui style to look like the rest of the application, the appearance can be customized with `egui::Style` and `egui::Context::set_style`.

Expand Down Expand Up @@ -188,15 +191,20 @@ FileDialog::new()
With the options the dialog then looks like this:
<img src="media/customization_demo.png">

The smallest possible dialog can be generated with the following configuration:

If you want to display your own information in the file dialog, you can update the file dialog with
`update_with_right_panel_ui` instead of `update`. This allows e.g. to display custom image previews or further
information about the selected item. See [custom-right-panel](https://github.com/fluxxcode/egui-file-dialog/tree/develop/examples/custom-right-panel) for the full example.
```rust
FileDialog::new()
.title_bar(false)
.show_top_panel(false)
.show_left_panel(false)
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
// Update the dialog with a custom right panel
self.file_dialog.update_with_right_panel_ui(ctx, &mut |ui, dialog| {
ui.label("This is a custom label");
ui.add_space(5.0);
ui.label(format!("Currently selected item:\n{:?}", dialog.active_entry()));
});
}
```
<img src="media/customization_demo_2.png">
<img src="media/right_panel_demo.png">

## Multilingual support
For desktop applications it is often necessary to offer different languages. While the dialog currently only offers English labels by default, the labels are fully customizable. This makes it possible to adapt the labels to different languages.
Expand Down
Binary file removed media/customization_demo_2.png
Binary file not shown.
Binary file added media/right_panel_demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0c585c1

Please sign in to comment.