cui/source/options/treeopt.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit c60ca3582598c7b9b9b33c288edbd76207f5b14d Author: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> AuthorDate: Thu Feb 27 23:05:53 2025 +0100 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Mon Mar 3 16:17:54 2025 +0100 tdf#134791 Clamp options dialog height to 80% of screen size to make buttons accessible on smaller screens. Change-Id: If43edfeb97ad710c69c0ea8780a9af6ee336a5c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182341 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 5fba9b37445e..6567423c0a06 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -473,6 +473,10 @@ OfaTreeOptionsDialog::OfaTreeOptionsDialog(weld::Window* pParent, bool fromExten , eRestartReason(svtools::RESTART_REASON_NONE) { Size aSize(xTreeLB->get_approximate_digit_width() * 100, xTreeLB->get_height_rows(30)); + AbsoluteScreenPixelRectangle aScreen + = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen()); + // clamp height to max of 80% of screen height to make buttons accessible on smaller screens + aSize.setHeight(std::min(static_cast<tools::Long>(aScreen.GetHeight() * 0.8), aSize.Height())); xTabBox->set_size_request(aSize.Width(), aSize.Height()); xTreeLB->set_size_request(xTreeLB->get_approximate_digit_width() * 35, aSize.Height());