diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-01 11:06:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-01 19:37:59 +0000 |
commit | 9a0710bb05b6b9bc0873dbc2d2dc5eb40ce02eba (patch) | |
tree | ab2a923a4bc6ffbadd7848d85195c9cff9614b17 /sc/source/ui/inc/inputwin.hxx | |
parent | 1ec54b38f1fad81d8e456c6c7d2e4a1d665f25b9 (diff) |
tdf#153784 account for initial vertical offset when toggled into multiline
Initially there is 1 line and the edit is vertically centered in the
toolbar
Later, if expanded then the vertical position of the edit will remain at
that initial position, so when calculating the overall size of the
expanded toolbar we have to include that initial offset in order to not
make the edit overlap the RESIZE_HOTSPOT_HEIGHT area so that dragging to
resize is still possible.
Change-Id: Ic99e1cf4f3b1ca53c5d6feaa50d8bfac030f8124
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148069
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/inc/inputwin.hxx')
-rw-r--r-- | sc/source/ui/inc/inputwin.hxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index e8e63855ffd6..f0f69e948843 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -262,11 +262,11 @@ public: void IncrementVerticalSize(); void DecrementVerticalSize(); void NumLinesChanged(); - virtual tools::Long GetNumLines() const override { return mxTextWndGroup->GetNumLines(); } + virtual tools::Long GetNumLines() const override { return mxTextWndGroup->GetNumLines(); } - int GetPixelHeightForLines() const + int GetPixelHeightForLines(tools::Long nLines) const { - return mxTextWndGroup->GetPixelHeightForLines(GetNumLines()); + return mxTextWndGroup->GetPixelHeightForLines(nLines); } weld::Builder& GetBuilder() { return *m_xBuilder; } @@ -348,7 +348,8 @@ private: VclPtr<ScInputBarGroup> mxTextWindow; ScInputHandler* pInputHdl; ScTabViewShell* mpViewShell; - tools::Long mnMaxY; + tools::Long mnMaxY; + tools::Long mnStandardItemHeight; bool bIsOkCancelMode; bool bInResize; }; |