Make image_view respect style scale
This commit is contained in:
parent
5a64593219
commit
b4c19a2ca7
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue