include/svx/strings.hrc | 2 ++ svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 12 ++++++++++++ 2 files changed, 14 insertions(+)
New commits: commit 4d2849d1f6b55b6be4e342a8cf897c03afdba862 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Jan 26 13:11:33 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jan 26 17:08:18 2021 +0100 move the label width matching into source as mentioned in https://gerrit.libreoffice.org/c/core/+/109308 "tdf#119931 Fix accessibility warnings" so the .ui itself is clean and make this an explicit effort Change-Id: I782f79f8e3e022c86d860c946ec1426f26f57990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109955 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 95e9690b0b9e..9adfceb7b465 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1752,6 +1752,8 @@ #define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:") #define RID_SVXSTR_SIGNATURELINE_DATE NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1") +#define RID_SVXSTR_TRANSPARENCY NC_("RID_SVXSTR_TRANSPARENCY", "Transparency:") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 39b1af2ea060..a91f39741dee 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -32,6 +32,7 @@ #include <sfx2/viewfrm.hxx> #include <sfx2/weldutils.hxx> #include <svx/dialcontrol.hxx> +#include <svx/dialmgr.hxx> #include <svx/rectenum.hxx> #include <svx/sdangitm.hxx> #include <unotools/viewoptions.hxx> @@ -39,6 +40,7 @@ #include <vcl/canvastools.hxx> #include <vcl/fieldvalues.hxx> #include <svl/intitem.hxx> +#include <svx/strings.hrc> #include <svx/svdpagv.hxx> #include <svx/svdview.hxx> #include <svx/transfrmhelper.hxx> @@ -116,6 +118,16 @@ PosSizePropertyPanel::PosSizePropertyPanel( { Initialize(); + // A guesstimate of the longest label in the various sidebar panes to use + // to get this pane's contents to align with them, for lack of a better + // solution + auto nWidth = mxFtWidth->get_preferred_size().Width(); + OUString sLabel = mxFtWidth->get_label(); + mxFtWidth->set_label(SvxResId(RID_SVXSTR_TRANSPARENCY)); + nWidth = std::max(nWidth, mxFtWidth->get_preferred_size().Width());; + mxFtWidth->set_label(sLabel); + mxFtWidth->set_size_request(nWidth, -1); + mpBindings->Update( SID_ATTR_METRIC ); mpBindings->Update( SID_ATTR_TRANSFORM_WIDTH ); mpBindings->Update( SID_ATTR_TRANSFORM_HEIGHT ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits