Commit 300cb6f
feat: implement information view and preview for files (#184)
* initial implementation of file information display
* revert previous prototype and create information_panel.rs
* add meta data grid
* update meta_data
* revert public config and selected item
* only read 1000 characters of text files and implement Markdown as an example
* add separators
* introduce info_panel feature
* upload test_image
* implement metadata, markdown and image preview
* metadata in ScrollArea and only display size for files, not directories
* clean up, add doc and add folder icon as preview
* removed profiles, not used anymore
* image crate needs to be loaded always, because of the Image metadata loaded in directory_content.rs
* only load image crate when using info_panel feature
* only load text content once. show icon if no preview is available
* extend preview for jpeg and jpg
* extension to lowercase, so it does not matter how they are stored on the file system. added color space
* rapidly decreased loading times of directories using image-meta crate instead of image crate
* indexmap instead of hashmap, so that metadata is always in the same order
* cargo clippy
* remove unused doc
* Update Cargo.toml
Co-authored-by: Nicolas <bircni@icloud.com>
* workflow fix
* reformat
* text content is now only loaded for the selected file and then stored in the ActiveDirectory
* not hard-coding max chars of text preview
* fix width and compilation errors
* implement custom metadata loader
* remove unused dependency
* code review by bircni
* required for image loader
* add for cargo machete. image crate is required per documentation of egui loaders
* remove md render
* use picked instead of selected
* rename example
* rename example
* create metadata struct
* rustfmt
* implement content_mut
* fix typo
* implement `InfoPanelEntry` struct
* change feature name to information_view
* move format_pixels() to information_panel.rs
* add screenshot and remove test_image
* remove print
* change date formatting
* Update examples/select_file_with_information_view/README.md
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* Update src/data/information_panel.rs
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* Update src/data/information_panel.rs
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* add docs
* introduced path_buf variable
* code review
* rename handler
* set image max width to be as high as the panel is wide
* show icon for all files
* don't set width of meta grid
* adapt for latest example structure
* Revert "don't set width of meta grid"
This reverts commit 0c4eb84.
* add comment for image crate
* clippy
* remove images if more than 10 are loaded
* move information_panel.rs
* rustfmt
* better doc for example
* update README.md
* implement `forget_all_stored_images`
* implement `forget_all_stored_images` in `MyApp::update()`
* update Cargo.toml
* Update examples/README.md
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* pick file rename
* remove hardcoded icon width
* id with `FileDialog` as parent
* fix id
* windows should always take up the same amount of space
* Update src/information_panel.rs
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* Update src/information_panel.rs
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* extract image display function
* rustfmt
* all previews should have the same size
* Update examples/pick_file_with_information_view.rs
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* Update Cargo.toml
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>
* fix typo
---------
Co-authored-by: Nicolas <bircni@icloud.com>
Co-authored-by: Jannis <55352293+fluxxcode@users.noreply.github.com>1 parent 042efb2 commit 300cb6f
File tree
10 files changed
+630
-11
lines changed- examples
- media/examples
- src
- config
- data
10 files changed
+630
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
30 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| 67 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
| 266 | + | |
263 | 267 | | |
264 | 268 | | |
265 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | | - | |
| 20 | + | |
13 | 21 | | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
17 | 25 | | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| |||
25 | 34 | | |
26 | 35 | | |
27 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
28 | 46 | | |
29 | 47 | | |
| 48 | + | |
30 | 49 | | |
31 | 50 | | |
32 | 51 | | |
33 | 52 | | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
37 | 61 | | |
38 | 62 | | |
39 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
445 | 455 | | |
446 | 456 | | |
447 | 457 | | |
| |||
1168 | 1178 | | |
1169 | 1179 | | |
1170 | 1180 | | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1171 | 1186 | | |
1172 | 1187 | | |
1173 | 1188 | | |
| |||
1213 | 1228 | | |
1214 | 1229 | | |
1215 | 1230 | | |
1216 | | - | |
| 1231 | + | |
1217 | 1232 | | |
1218 | 1233 | | |
1219 | | - | |
1220 | | - | |
1221 | | - | |
1222 | | - | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
1223 | 1241 | | |
1224 | 1242 | | |
1225 | 1243 | | |
| |||
0 commit comments