diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2016-10-28 23:55:53 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-10-29 21:48:30 +0000 |
commit | b7c2764145be2c3fc50397f241dbdb0c53f9befd (patch) | |
tree | f861b28305b99047f430d0c067447eb615c6641b /sfx2/source | |
parent | a0cf18f58fd060dd3ef4f60ad7b17c8f8dc662dd (diff) |
convert usages of DPIScalingFactor from int to float
Change-Id: I049b3d2cde4dcb8c8c0690d75a015a43cb71b0c0
Reviewed-on: https://gerrit.libreoffice.org/30381
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/infobar.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx index 331952ef5cfc..672d8198e3a6 100644 --- a/sfx2/source/dialog/infobar.cxx +++ b/sfx2/source/dialog/infobar.cxx @@ -154,9 +154,9 @@ SfxInfoBarWindow::SfxInfoBarWindow(vcl::Window* pParent, const OUString& sId, if (pMessageColor) m_pMessage->SetControlForeground(Color(*pMessageColor)); - sal_Int32 nScaleFactor = GetDPIScaleFactor(); + float fScaleFactor = GetDPIScaleFactor(); long nWidth = pParent->GetSizePixel().getWidth(); - SetPosSizePixel(Point(0, 0), Size(nWidth, INFO_BAR_BASE_HEIGHT * nScaleFactor)); + SetPosSizePixel(Point(0, 0), Size(nWidth, INFO_BAR_BASE_HEIGHT * fScaleFactor)); m_pMessage->SetText(sMessage); m_pMessage->Show(); @@ -233,25 +233,25 @@ void SfxInfoBarWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle void SfxInfoBarWindow::Resize() { - sal_Int32 nScaleFactor = GetDPIScaleFactor(); + float fScaleFactor = GetDPIScaleFactor(); long nWidth = GetSizePixel().getWidth(); - m_pCloseBtn->SetPosSizePixel(Point(nWidth - 25 * nScaleFactor, 15 * nScaleFactor), Size(10 * nScaleFactor, 10 * nScaleFactor)); + m_pCloseBtn->SetPosSizePixel(Point(nWidth - 25 * fScaleFactor, 15 * fScaleFactor), Size(10 * fScaleFactor, 10 * fScaleFactor)); // Reparent the buttons and place them on the right of the bar - long nX = m_pCloseBtn->GetPosPixel().getX() - 15 * nScaleFactor; - long nButtonGap = 5 * nScaleFactor; + long nX = m_pCloseBtn->GetPosPixel().getX() - 15 * fScaleFactor; + long nButtonGap = 5 * fScaleFactor; for (auto it = m_aActionBtns.begin(); it != m_aActionBtns.end(); ++it) { long nButtonWidth = (*it)->GetSizePixel().getWidth(); nX -= nButtonWidth; - (*it)->SetPosSizePixel(Point(nX, 5 * nScaleFactor), Size(nButtonWidth, 30 * nScaleFactor)); + (*it)->SetPosSizePixel(Point(nX, 5 * fScaleFactor), Size(nButtonWidth, 30 * fScaleFactor)); nX -= nButtonGap; } - Point aMessagePosition(10 * nScaleFactor, 10 * nScaleFactor); - Size aMessageSize(nX - 20 * nScaleFactor, 20 * nScaleFactor); + Point aMessagePosition(10 * fScaleFactor, 10 * fScaleFactor); + Size aMessageSize(nX - 20 * fScaleFactor, 20 * fScaleFactor); m_pMessage->SetPosSizePixel(aMessagePosition, aMessageSize); } |