diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-03-16 09:55:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-03-16 14:37:47 +0000 |
commit | bda036f0fe34cb8f20e1d4441f1514bae68df69f (patch) | |
tree | 4fe3e1d53fa9140ad1c3c54fd6c34e37bab161d5 /svtools | |
parent | 44271f3997f2374d81a2336131fef7ac79499048 (diff) |
update line controls preview if style changed
e.g. in page style dialog, footnote page, line menubutton,
if theme changes from light<->dark while the dialog remains open
Change-Id: If8ca8b2cf9c4e4d620ce0ea1c92c50accbc8ebcb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148981
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 5aec7838c015..a17172d5ca44 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1420,6 +1420,7 @@ SvtLineListBox::SvtLineListBox(std::unique_ptr<weld::MenuButton> pControl) m_xTopLevel->connect_focus_in(LINK(this, SvtLineListBox, FocusHdl)); m_xControl->set_popover(m_xTopLevel.get()); m_xControl->connect_toggled(LINK(this, SvtLineListBox, ToggleHdl)); + m_xControl->connect_style_updated(LINK(this, SvtLineListBox, StyleUpdatedHdl)); // lock size to these maxes height/width so it doesn't jump around in size m_xControl->set_label(GetLineStyleName(SvxBorderLineStyle::NONE)); @@ -1451,6 +1452,12 @@ IMPL_LINK(SvtLineListBox, ToggleHdl, weld::Toggleable&, rButton, void) FocusHdl(*m_xTopLevel); } +IMPL_LINK_NOARG(SvtLineListBox, StyleUpdatedHdl, weld::Widget&, void) +{ + UpdateEntries(); + UpdatePreview(); +} + IMPL_LINK_NOARG(SvtLineListBox, NoneHdl, weld::Button&, void) { SelectEntry(SvxBorderLineStyle::NONE); |