tdf#159865 Revert "tdf#136905 NBB: let ValueSetWithTextControl set optimal"
...height
This reverts my 24.2 commit 1876feb8a8805b2f80537e2828c152ccbdf67fe2.
Change-Id: I70c3668393a13992f9ce489e86b07860218445b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163954
Tested-by: Justin Luth <jluth@mail.com>
Reviewed-by: Justin Luth <jluth@mail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163961
Tested-by: Jenkins
diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx
index 407e960..ac397f9 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 91cea51..b5b1f2b 100644
--- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
+++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx
@@ -43,15 +43,6 @@ void ValueSetWithTextControl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
SetColCount();
}
void ValueSetWithTextControl::SetOptimalDrawingAreaHeight()
{
const vcl::Font aFont(Application::GetSettings().GetStyleSettings().GetLabelFont());
const sal_Int32 nRowHeight = aFont.GetFontSize().Height() * 9 / 4; // see UserDraw()
const Size aSize(GetOutputSizePixel().Width(), nRowHeight * 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 4ea5995..a2dbe40 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();