include/svx/sidebar/ValueSetWithTextControl.hxx | 1 - svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 11 ----------- sw/source/uibase/sidebar/PageSizeControl.cxx | 1 - 3 files changed, 13 deletions(-)
New commits: commit 7c3cdc88337959ddbb9799c4cee57901e94719f3 Author: Justin Luth <jl...@mail.com> AuthorDate: Mon Feb 26 11:09:59 2024 -0500 Commit: Justin Luth <jl...@mail.com> CommitDate: Mon Feb 26 18:55:51 2024 +0100 tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal" ...height This reverts my 24.2 commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2 (as well as my initial attempt to fix it in 24.8). Change-Id: I70c3668393a13992f9ce489e86b07860218445b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163954 Tested-by: Justin Luth <jl...@mail.com> Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx index 407e9606757f..ac397f9fdab6 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/include/svx/sidebar/ValueSetWithTextControl.hxx @@ -40,7 +40,6 @@ public: SVX_DLLPRIVATE virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; - void SetOptimalDrawingAreaHeight(); void AddItem(const OUString& rItemText, const OUString& rItemText2); SVX_DLLPRIVATE virtual void UserDraw(const UserDrawEvent& rUDEvt) override; diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index d55740315c99..cddd7b0aa801 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -42,17 +42,6 @@ void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea) SetColCount(); } -void ValueSetWithTextControl::SetOptimalDrawingAreaHeight() -{ - const vcl::Font aFont(Application::GetSettings().GetStyleSettings().GetLabelFont()); - double fRowHeight = aFont.GetFontSize().Height() * 9 / 4.0; // see UserDraw() - // It still looks too small. Probably the height specified should be the leading point size? - fRowHeight *= 1.2; // add 20% leading - const Size aSize(GetOutputSizePixel().Width(), fRowHeight * maItems.size()); - GetDrawingArea()->set_size_request(aSize.Width(), aSize.Height()); - SetOutputSizePixel(aSize); -} - void ValueSetWithTextControl::AddItem( const OUString& rItemText, const OUString& rItemText2 ) diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx index 2591ffd99718..37ed1835e972 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.cxx +++ b/sw/source/uibase/sidebar/PageSizeControl.cxx @@ -168,7 +168,6 @@ PageSizeControl::PageSizeControl(PageSizePopup* pControl, weld::Widget* pParent) } mxSizeValueSet->SetNoSelection(); mxSizeValueSet->SetSelectHdl( LINK(this, PageSizeControl, ImplSizeHdl ) ); - mxSizeValueSet->SetOptimalDrawingAreaHeight(); mxSizeValueSet->Show(); mxSizeValueSet->Resize();