summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-29 13:51:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-29 20:14:35 +0100
commitfdeada8c50c3e9126537ceafc649c85dc4be598c (patch)
tree34c1da2c082777867141865264be86f0b93110c8 /starmath/inc
parent938e6d7a59aa3272afdcf64c14e0647da7f2544f (diff)
tdf#124410 re-call SetScrollBarRange when aSymbolSet changes
and do the work that depends on size happen at size-changed instead of first-draw Change-Id: Ia2605ba9bb875be9248a009a6f26f01cbbbd4632 Reviewed-on: https://gerrit.libreoffice.org/69928 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/dialog.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index da6c6eeaf2c5..713ecb5ae8e5 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -259,6 +259,7 @@ class SmShowSymbolSet : public weld::CustomWidgetController
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
virtual bool KeyInput(const KeyEvent& rKEvt) override;
+ virtual void Resize() override;
DECL_LINK(ScrollHdl, weld::ScrolledWindow&, void);
@@ -268,8 +269,11 @@ public:
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
{
CustomWidgetController::SetDrawingArea(pDrawingArea);
- pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() * 27,
- pDrawingArea->get_text_height() * 9);
+ m_aOldSize = Size(pDrawingArea->get_approximate_digit_width() * 27,
+ pDrawingArea->get_text_height() * 9);
+ pDrawingArea->set_size_request(m_aOldSize.Width(), m_aOldSize.Height());
+ SetOutputSizePixel(m_aOldSize);
+ calccols(pDrawingArea->get_ref_device());
}
void calccols(const vcl::RenderContext& rRenderContext);