sfx2/source/sidebar/Deck.cxx | 7 +++++-- sfx2/source/sidebar/DeckLayouter.cxx | 7 ++++++- sfx2/source/sidebar/SidebarController.cxx | 6 +++++- sfx2/source/sidebar/TabBar.cxx | 5 +++++ 4 files changed, 21 insertions(+), 4 deletions(-)
New commits: commit eecedf21f4869dd52a6498377e35d85d2321ac80 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Sat Jan 16 17:56:34 2021 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sun Jan 17 00:13:56 2021 +0100 sidebar: avoid invalidation thrash with LOK. Avoids complete sidebar invalidate when entering text into a cell and hitting enter. Change-Id: I88ee3792589a1c0a16ae555da77ed7c12ca5f296 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109403 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index c4c9cd4b9a81..f90ec176b2d0 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -613,7 +613,12 @@ void UpdateFiller ( vcl::Window& rFiller, const tools::Rectangle& rBox) { - if (rBox.GetHeight() > 0) + if (comphelper::LibreOfficeKit::isActive()) + { + // Not shown on LOK, and causes invalidation thrash + rFiller.Hide(); + } + else if (rBox.GetHeight() > 0) { // Show the filler. rFiller.SetBackground(Theme::GetColor(Theme::Color_PanelBackground)); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 168719f84d23..60013c9b9274 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -793,7 +793,11 @@ void SidebarController::SwitchToDeck ( msCurrentDeckId = rDeckDescriptor.msId; } - mpTabBar->Invalidate(); + + // invisible with LOK, so avoid invalidations + if (!comphelper::LibreOfficeKit::isActive()) + mpTabBar->Invalidate(); + mpTabBar->HighlightDeck(msCurrentDeckId); // Determine the panels to display in the deck. diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index fc6124f79659..b989cb7d0964 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -24,6 +24,7 @@ #include <sfx2/sidebar/FocusManager.hxx> #include <sfx2/sidebar/SidebarController.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <o3tl/safeint.hxx> #include <vcl/commandevent.hxx> @@ -104,6 +105,10 @@ sal_Int32 TabBar::GetDefaultWidth() void TabBar::SetDecks(const ResourceManager::DeckContextDescriptorContainer& rDecks) { + // invisible with LOK, so keep empty to avoid invalidations + if (comphelper::LibreOfficeKit::isActive()) + return; + // Remove the current buttons. maItems.clear(); for (auto const& deck : rDecks) commit 8941f3f65e149c9f53c425c9cc153b32d8cd2482 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Sat Jan 16 17:56:06 2021 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sun Jan 17 00:13:44 2021 +0100 sidebar: only invalidate when things change. Change-Id: Icc9c5bcde224cc979b834585531b847f1c5f7d0b Signed-off-by: Michael Meeks <michael.me...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109457 Tested-by: Jenkins diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index ac376f571eb7..8578c398e3fa 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -435,8 +435,11 @@ void Deck::ScrollContainerWindow::Paint(vcl::RenderContext& rRenderContext, cons void Deck::ScrollContainerWindow::SetSeparators (const ::std::vector<sal_Int32>& rSeparators) { - maSeparators = rSeparators; - Invalidate(); + if (rSeparators != maSeparators) + { + maSeparators = rSeparators; + Invalidate(); + } } } // end of namespace sfx2::sidebar _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits