summaryrefslogtreecommitdiff
path: root/sd/source/ui/animations/SlideTransitionPane.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-04 14:48:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-04 20:55:55 +0100
commit580ee655540ccfae461851d298c1f411e809ce39 (patch)
tree5f6ddefb4447c6a3a5b2de1d330efa6420e9a163 /sd/source/ui/animations/SlideTransitionPane.cxx
parent92fd92f9ad13f6c8f491cf94ee45de2996d1ff82 (diff)
allow slide transition panel to be narrower
Change-Id: Ib1fc71fe189b199fef6feb4f5f72f4513dfded97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111965 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source/ui/animations/SlideTransitionPane.cxx')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 908f78df3f70..ea56c90f9902 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -427,13 +427,12 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
mxPB_PLAY = m_xBuilder->weld_button("play");
mxCB_AUTO_PREVIEW = m_xBuilder->weld_check_button("auto_preview");
- weld::SpinButton& rSpinButton = mxMF_ADVANCE_AUTO_AFTER->get_widget();
- auto nMax = rSpinButton.get_max();
- rSpinButton.set_max(1000);
- Size aOptimalSize(rSpinButton.get_preferred_size());
- rSpinButton.set_size_request(aOptimalSize.Width(), -1);
- mxCBX_duration->get_widget().set_size_request(aOptimalSize.Width(), -1);
- rSpinButton.set_max(nMax);
+ auto nMax = mxMF_ADVANCE_AUTO_AFTER->get_max(FieldUnit::SECOND);
+ mxMF_ADVANCE_AUTO_AFTER->set_max(99, FieldUnit::SECOND);
+ int nWidthChars = mxMF_ADVANCE_AUTO_AFTER->get_width_chars();
+ mxMF_ADVANCE_AUTO_AFTER->set_max(nMax, FieldUnit::SECOND);
+ mxMF_ADVANCE_AUTO_AFTER->set_width_chars(nWidthChars);
+ mxCBX_duration->set_width_chars(nWidthChars);
mxVS_TRANSITION_ICONS.reset(new TransitionPane(m_xBuilder->weld_scrolled_window("transitions_iconswin", true)));
mxVS_TRANSITION_ICONSWin.reset(new weld::CustomWeld(*m_xBuilder, "transitions_icons", *mxVS_TRANSITION_ICONS));