diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-26 13:11:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-26 17:08:18 +0100 |
commit | 4d2849d1f6b55b6be4e342a8cf897c03afdba862 (patch) | |
tree | d66791511f72cd03711287fdb22324c8b55107e6 /svx | |
parent | e40ed5a142ca0258efd15f860e8c0e5d2b97cd39 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
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 ); |