cui/source/dialogs/SpellDialog.cxx | 13 +++++++++++++ cui/source/inc/SpellDialog.hxx | 3 +++ svx/uiconfig/ui/currencywindow.ui | 36 ++++++++++++++++++------------------ 3 files changed, 34 insertions(+), 18 deletions(-)
New commits: commit 8303ffcb807abeeb168e8071778dab5601f1d839 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Mar 29 16:34:42 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Mar 29 20:30:37 2024 +0100 resave with latest glade Change-Id: If56e9d6c09b9622670ef37e235dde8be2c3ca88e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165556 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/svx/uiconfig/ui/currencywindow.ui b/svx/uiconfig/ui/currencywindow.ui index c58a0c49226d..7f0008888338 100644 --- a/svx/uiconfig/ui/currencywindow.ui +++ b/svx/uiconfig/ui/currencywindow.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.22.1 --> +<!-- Generated with glade 3.40.0 --> <interface domain="svx"> <requires lib="gtk+" version="3.20"/> <object class="GtkTreeStore" id="liststore1"> @@ -11,22 +11,22 @@ </columns> </object> <object class="GtkPopover" id="CurrencyWindow"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="border_width">4</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="border-width">4</property> <property name="constrain-to">none</property> <child> <object class="GtkBox" id="container"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">currency</property> + <property name="can-focus">False</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">currency</property> <property name="xalign">0</property> </object> <packing> @@ -38,22 +38,22 @@ <child> <object class="GtkScrolledWindow"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="hscrollbar_policy">never</property> - <property name="shadow_type">in</property> + <property name="hscrollbar-policy">never</property> + <property name="shadow-type">in</property> <child> <object class="GtkTreeView" id="currency"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="model">liststore1</property> - <property name="headers_visible">False</property> - <property name="headers_clickable">False</property> - <property name="search_column">0</property> - <property name="show_expanders">False</property> + <property name="headers-visible">False</property> + <property name="headers-clickable">False</property> + <property name="search-column">0</property> + <property name="show-expanders">False</property> <child internal-child="selection"> <object class="GtkTreeSelection" id="selection"/> </child> @@ -80,8 +80,8 @@ <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> commit 26f6145b9af5738d5d3b8fe641b99b3908d81e55 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Mar 29 16:22:10 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri Mar 29 20:30:29 2024 +0100 Resolves: tdf#160159 update spellchecking area colors when style changes so for the case of using "automatic" for the document background the spelling checking textbox background area updates to match Change-Id: I8723afb946176596b0a5fa43aa3bb3c036dee12c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165554 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dfdad984ec41..9dd877f80cf9 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -1152,6 +1152,13 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetStatusEventHdl(LINK(this, SentenceEditWindow_Impl, EditStatusHdl)); + SetDocumentColor(pDrawingArea); +} + +void SentenceEditWindow_Impl::SetDocumentColor(weld::DrawingArea* pDrawingArea) +{ + if (!pDrawingArea || !m_xEditView || !m_xEditEngine) + return; // tdf#142631 use document background color in this widget Color aBgColor = svtools::ColorConfig().GetColorValue(svtools::DOCCOLOR).nColor; OutputDevice& rDevice = pDrawingArea->get_ref_device(); @@ -1160,6 +1167,12 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) m_xEditEngine->SetBackgroundColor(aBgColor); } +void SentenceEditWindow_Impl::StyleUpdated() +{ + SetDocumentColor(GetDrawingArea()); + WeldEditView::StyleUpdated(); +} + IMPL_LINK_NOARG(SentenceEditWindow_Impl, EditStatusHdl, EditStatus&, void) { SetScrollBarRange(); diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index fdf5e81bcdf3..81d68e214314 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -71,6 +71,7 @@ private: protected: virtual bool KeyInput( const KeyEvent& rKEvt ) override; + virtual void StyleUpdated() override; public: SentenceEditWindow_Impl(std::unique_ptr<weld::ScrolledWindow> xScrolledWindow); @@ -120,6 +121,8 @@ public: void MoveErrorEnd(tools::Long nOffset); void ResetIgnoreErrorsAt() { m_aIgnoreErrorsAt.clear(); } + + void SetDocumentColor(weld::DrawingArea* pDrawingArea); }; // class SvxSpellDialog ---------------------------------------------