@@ -131,13 +131,8 @@ module Buttons =
131 .onTapped (fun _ -> msg)
131 .onTapped (fun _ -> msg)
134− let smallImageButton (img: byte[] option) (msg: 'msg) =
134+ let smallImageButton (asset: string) (msg: 'msg) =
137− | None -> "img-button"
138− | Some i -> $"img-button-{hash i}"
135+ Component($"img-button-{asset}") {
141 let! pressed = Context.State(false)
136 let! pressed = Context.State(false)
142 let offset = if pressed.Current then 2. else 4.
137 let offset = if pressed.Current then 2. else 4.
@@ -146,17 +141,7 @@ module Buttons =
147 Rectangle().fill (SolidColorBrush(Colors.White))
142 Rectangle().fill (SolidColorBrush(Colors.White))
149− match img with
144+ Image(asset, Stretch.Uniform).width(24.).height(24.).center ()
152− Image("avares://Skrepka/Assets/Images/user.png", Stretch.Uniform)
159− Image(Styles.cachedBitmap i, Stretch.UniformToFill).width(32.).height(32.).clipToBounds (true)
161 borderRect ()
146 borderRect ()