Skip to content

Commit 5b3d4df

Browse files
committed
Added default img
1 parent 06bbbf6 commit 5b3d4df

File tree

2 files changed

+29
-26
lines changed

2 files changed

+29
-26
lines changed

resources/img/default_image.png

4.79 KB
Loading

src/shared/image_viewer_modal.rs

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,39 @@ live_design! {
1212

1313
use crate::shared::styles::*;
1414
use crate::shared::icon_button::RobrixIconButton;
15-
IMG_DEFAULT_AVATAR = dep("crate://self/resources/img/default_avatar.png")
15+
IMG_DEFAULT = dep("crate://self/resources/img/default_image.png")
1616
pub ImageViewerModal = {{ImageViewerModal}} {
1717
width: Fill, height: Fill
1818
image_modal = <Modal> {
19-
content: {
20-
<RoundedView> {
21-
flow: Down
22-
width: 700
23-
height: 700
24-
padding: 10
25-
spacing: 0
26-
27-
show_bg: true
28-
draw_bg: {
29-
//color: #000
30-
color: #ffffff
31-
border_radius: 8.0
19+
content: <View> {
20+
flow: Overlay
21+
width: Fill
22+
height: Fill
23+
padding: 5
24+
spacing: 0
25+
26+
show_bg: true
27+
draw_bg: {
28+
color: #000
29+
border_radius: 8.0
30+
}
31+
image_container = <View> {
32+
width: Fill,
33+
height: Fill,
34+
flow: Down,
35+
align: {x: 0.5}
36+
image = <Image> {
37+
height: Fill
38+
width: Fill
39+
fit: Smallest,
40+
source: (IMG_DEFAULT)
3241
}
42+
}
43+
<View> {
44+
width: Fill,
45+
height: Fill,
46+
flow: Down,
47+
align: {x: 0.5}
3348
header = <View> {
3449
width: Fill,
3550
height: Fit
@@ -40,7 +55,6 @@ live_design! {
4055
height: Fit,
4156
spacing: 0,
4257
margin: 7,
43-
padding: 15,
4458

4559
draw_bg: {
4660
color: (COLOR_SECONDARY)
@@ -54,17 +68,6 @@ live_design! {
5468
icon_walk: {width: 14, height: 14}
5569
}
5670
}
57-
image_container = <View> {
58-
width: Fill,
59-
height: Fill,
60-
align: {x: 0.5}
61-
image = <Image> {
62-
height: Fill
63-
width: Fill
64-
fit: Smallest,
65-
source: (IMG_DEFAULT_AVATAR)
66-
}
67-
}
6871
loading_view = <View> {
6972
width: Fill,
7073
height: Fit,

0 commit comments

Comments
 (0)