diff options
author | dbeurle <dbeurle@student.unimelb.edu.au> | 2015-01-12 17:36:02 +1100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-01-14 12:49:50 +0000 |
commit | 8748ae646bd5347ce9b964efbb941a873a7b5e0d (patch) | |
tree | 89dcaa000180879877a965c56d896a0f25d205c5 /svx | |
parent | 1049511c0c5d881df4ba8042744d63d37878296f (diff) |
HiDPI changes to ruler to respect screen DPI
Change-Id: I4cbb303b395ad60d4935bff55fbaea08f13334a0
Reviewed-on: https://gerrit.libreoffice.org/13867
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index b8696891fc0b..39ae343f30d8 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -157,6 +157,26 @@ struct SvxRuler_Impl { }; +static RulerTabData ruler_tab_svx = +{ + 0, // DPIScaleFactor to be set + 7, // ruler_tab_width + 6, // ruler_tab_height + 0, // ruler_tab_height2 + 0, // ruler_tab_width2 + 0, // ruler_tab_cwidth + 0, // ruler_tab_cwidth2 + 0, // ruler_tab_cwidth3 + 0, // ruler_tab_cwidth4 + 0, // ruler_tab_dheight + 0, // ruler_tab_dheight2 + 0, // ruler_tab_dwidth + 0, // ruler_tab_dwidth2 + 0, // ruler_tab_dwidth3 + 0, // ruler_tab_dwidth4 + 0 // ruler_tab_textoff +}; + void SvxRuler_Impl::SetPercSize(sal_uInt16 nSize) { if(nSize > nPercSize) @@ -312,6 +332,11 @@ SvxRuler::SvxRuler( SetExtraType(RULER_EXTRA_NULLOFFSET, 0); rBindings.LeaveRegistrations(); + + ruler_tab_svx.DPIScaleFactor = pParent->GetDPIScaleFactor(); + ruler_tab_svx.height *= ruler_tab_svx.DPIScaleFactor; + ruler_tab_svx.width *= ruler_tab_svx.DPIScaleFactor; + } SvxRuler::~SvxRuler() @@ -3421,7 +3446,7 @@ void SvxRuler::Command( const CommandEvent& rCommandEvent ) PopupMenu aMenu; aMenu.SetSelectHdl(LINK(this, SvxRuler, TabMenuSelect)); VirtualDevice aDev; - const Size aSz(RULER_TAB_WIDTH + 2, RULER_TAB_HEIGHT + 2); + const Size aSz(ruler_tab_svx.width + 2, ruler_tab_svx.height + 2); aDev.SetOutputSize(aSz); aDev.SetBackground(Wallpaper(Color(COL_WHITE))); Color aFillColor(aDev.GetSettings().GetStyleSettings().GetShadowColor()); |