summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-26 13:11:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-26 17:08:18 +0100
commit4d2849d1f6b55b6be4e342a8cf897c03afdba862 (patch)
treed66791511f72cd03711287fdb22324c8b55107e6
parente40ed5a142ca0258efd15f860e8c0e5d2b97cd39 (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>
-rw-r--r--include/svx/strings.hrc2
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx12
2 files changed, 14 insertions, 0 deletions
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 );