File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -3016,19 +3016,27 @@ impl Tab {
3016
3016
ItemThumbnail :: Image ( handle, _) => {
3017
3017
if let Some ( path) = item. path_opt ( ) {
3018
3018
element_opt = Some (
3019
- //TODO: use widget::image::viewer, when its zoom can be reset
3020
- widget:: image ( widget:: image:: Handle :: from_path ( path) )
3021
- . width ( Length :: Fill )
3022
- . height ( Length :: Fill )
3023
- . into ( ) ,
3019
+ widget:: container (
3020
+ //TODO: use widget::image::viewer, when its zoom can be reset
3021
+ widget:: image ( widget:: image:: Handle :: from_path ( path) ) ,
3022
+ )
3023
+ . align_x ( Alignment :: Center )
3024
+ . align_y ( Alignment :: Center )
3025
+ . width ( Length :: Fill )
3026
+ . height ( Length :: Fill )
3027
+ . into ( ) ,
3024
3028
) ;
3025
3029
} else {
3026
3030
element_opt = Some (
3027
- //TODO: use widget::image::viewer, when its zoom can be reset
3028
- widget:: image ( handle. clone ( ) )
3029
- . width ( Length :: Fill )
3030
- . height ( Length :: Fill )
3031
- . into ( ) ,
3031
+ widget:: container (
3032
+ //TODO: use widget::image::viewer, when its zoom can be reset
3033
+ widget:: image ( handle. clone ( ) ) ,
3034
+ )
3035
+ . align_x ( Alignment :: Center )
3036
+ . align_y ( Alignment :: Center )
3037
+ . width ( Length :: Fill )
3038
+ . height ( Length :: Fill )
3039
+ . into ( ) ,
3032
3040
) ;
3033
3041
}
3034
3042
}
You can’t perform that action at this time.
0 commit comments