diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2022-11-23 22:35:59 +0100 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2022-12-01 12:33:45 +0100 |
commit | 0d9231f2133def9254e0220b8033a46e5fc17658 (patch) | |
tree | f03197ee729ea02db19f3408ae0bf902a475e4d2 /basctl/source/basicide/linenumberwindow.cxx | |
parent | d45d65559f11ecb34b14e3b5c838391c62c8c694 (diff) |
tdf#152078 Add a Zoom slider to the Basic IDE
This patch adds a ZoomSlider to thee Basic IDE. It has the following characteristics:
- The Zoom varies from 50% to 400% considering that 100% is the font size defined in Tools - Options - Fonts dialog.
- All open editor windows use the same Zoom factor
- The zoom level is saved and restored across sessions
Change-Id: I63df02d0dc828fca4360d61b8aa2c7af6610d4db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143159
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'basctl/source/basicide/linenumberwindow.cxx')
-rw-r--r-- | basctl/source/basicide/linenumberwindow.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/basctl/source/basicide/linenumberwindow.cxx b/basctl/source/basicide/linenumberwindow.cxx index 7dcbff0ddd7f..74ead4923863 100644 --- a/basctl/source/basicide/linenumberwindow.cxx +++ b/basctl/source/basicide/linenumberwindow.cxx @@ -48,8 +48,6 @@ void LineNumberWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Re if (!txtView) return; - GetParent()->Resize(); - int windowHeight = rRenderContext.GetOutputSize().Height(); int nLineHeight = rRenderContext.GetTextHeight(); if (!nLineHeight) @@ -82,6 +80,9 @@ void LineNumberWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Re rRenderContext.SetTextColor(m_FontColor); for (sal_uInt32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight) rRenderContext.DrawText(Point(0, y - m_nCurYOffset), OUString::number(n)); + + // Resize the parent after calculating the new width and height values + GetParent()->Resize(); } void LineNumberWindow::DataChanged(DataChangedEvent const& rDCEvt) |