@@ -131,13 +131,8 @@ module Buttons =
131131 .onTapped (fun _ -> msg)
132132 }
133133
134− let smallImageButton (img: byte[] option) (msg: 'msg) =
135− let key =
136− match img with
137− | None -> "img-button"
138− | Some i -> $"img-button-{hash i}"
139−
140− Component(key) {
134+ let smallImageButton (asset: string) (msg: 'msg) =
135+ Component($"img-button-{asset}") {
141136 let! pressed = Context.State(false)
142137 let offset = if pressed.Current then 2. else 4.
143138
@@ -146,17 +141,7 @@ module Buttons =
146141
147142 Rectangle().fill (SolidColorBrush(Colors.White))
148143
149− match img with
150− | None ->
151− ViewBox(
152− Image("avares://Skrepka/Assets/Images/user.png", Stretch.Uniform)
153− .width(32.)
154− .height(32.)
155− .margin (8.)
156− )
157−
158− | Some i ->
159− Image(Styles.cachedBitmap i, Stretch.UniformToFill).width(32.).height(32.).clipToBounds (true)
144+ Image(asset, Stretch.Uniform).width(24.).height(24.).center ()
160145
161146 borderRect ()
162147 })