Make image_view respect style scale

This commit is contained in:
Nikita Lisitsa 2022-02-18 11:51:37 +03:00
parent 5a64593219
commit b4c19a2ca7

View file

@ -31,9 +31,11 @@ namespace psemek::ui
{ {
auto r = element::size_constraints(); auto r = element::size_constraints();
auto st = merged_own_style();
if (image_) if (image_)
{ {
auto const size = image_.size(); auto const size = geom::cast<int>(image_.size()) * *st->scale;
if (!downscale_) if (!downscale_)
{ {
@ -55,7 +57,9 @@ namespace psemek::ui
{ {
if (!image_) return; if (!image_) return;
auto const size = image_.size(); auto st = merged_own_style();
auto const size = geom::cast<int>(image_.size()) * *st->scale;
auto box = shape_.box; auto box = shape_.box;