diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2018-11-26 11:06:20 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2018-11-27 13:09:33 +0100 |
commit | a71ea5cefffc4169237310d72f2d6e96c8bbf63d (patch) | |
tree | 581d84c1f4c393263fd8a695061cf53242de10ad /sd | |
parent | 3f2ac501e6593ef5095b308b887c48349e00c0a3 (diff) |
Preserve stock images until render time.
This allows us to choose to render HiDPI images at the right time,
when we have the DPI of the device to render to.
The first step in a better, and more industry standard way of
improving our UI for HiDPI via rendering level scaling that should
retain a consistent look across the app with many fewer changes.
Change-Id: I36681f3242cb650de4f0b2d0fcdffbe5618e30fc
Reviewed-on: https://gerrit.libreoffice.org/64040
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/controller/slidelayoutcontroller.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 611920043515..6f4ba93c1e92 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -132,13 +132,10 @@ static void fillLayoutValueSet( ValueSet* pValue, const snewfoil_value_info_layo for( ; pInfo->mpStrResId; pInfo++ ) { OUString aText(SdResId(pInfo->mpStrResId)); - BitmapEx aBmp(OUString::createFromAscii(pInfo->msBmpResId)); - - pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, - Image(aBmp), aText); - - aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(), aBmp.GetSizePixel().Width() ) ); - aLayoutItemSize.setHeight( std::max( aLayoutItemSize.Height(), aBmp.GetSizePixel().Height() ) ); + Image aImg("private:graphicrepository/" + OUString::createFromAscii(pInfo->msBmpResId)); + pValue->InsertItem(static_cast<sal_uInt16>(pInfo->maAutoLayout)+1, aImg, aText); + aLayoutItemSize.setWidth( std::max( aLayoutItemSize.Width(), aImg.GetSizePixel().Width() ) ); + aLayoutItemSize.setHeight( std::max( aLayoutItemSize.Height(), aImg.GetSizePixel().Height() ) ); } aLayoutItemSize = pValue->CalcItemSizePixel( aLayoutItemSize ); |