summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-02-08 11:11:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-02-08 14:55:26 +0000
commit52d070f753228cf99e76cb5656f12181fc0a397c (patch)
treef33a69fbc1a3624ffce252b28624c0468d3510ae
parent4e4717a27ceae2252befd9b3c49cc545fdb82c37 (diff)
remove SvTreeListEntry background color
and don't overwrite the rendercontext background, which has the side effect that switching dark/light mode or other theme changes gives immediate change in visible treeviews. So tools, options, view, switching Light/Dark, Apply doesn't show a treeview with the old modes background Change-Id: I9c403beba53f1f1a28464ad8c1c70018be1cf43f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146656 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/toolkit/treelistentry.hxx4
-rw-r--r--vcl/source/treelist/iconview.cxx4
-rw-r--r--vcl/source/treelist/treelistbox.cxx6
-rw-r--r--vcl/source/treelist/treelistentry.cxx1
4 files changed, 0 insertions, 15 deletions
diff --git a/include/vcl/toolkit/treelistentry.hxx b/include/vcl/toolkit/treelistentry.hxx
index 7a35e8e0b222..b8bffecefd30 100644
--- a/include/vcl/toolkit/treelistentry.hxx
+++ b/include/vcl/toolkit/treelistentry.hxx
@@ -68,7 +68,6 @@ class VCL_DLLPUBLIC SvTreeListEntry
ItemsType m_Items;
void* pUserData;
SvTLEntryFlags nEntryFlags;
- Color maBackColor;
std::optional<Color> mxTextColor;
private:
@@ -114,9 +113,6 @@ public:
SvTLEntryFlags GetFlags() const { return nEntryFlags;}
void SetFlags( SvTLEntryFlags nFlags );
- void SetBackColor( const Color& rColor ) { maBackColor = rColor; }
- const Color& GetBackColor() const { return maBackColor; }
-
void SetTextColor( std::optional<Color> xColor ) { mxTextColor = xColor; }
std::optional<Color> const & GetTextColor() const { return mxTextColor; }
diff --git a/vcl/source/treelist/iconview.cxx b/vcl/source/treelist/iconview.cxx
index b134991784b2..7d6c2683596e 100644
--- a/vcl/source/treelist/iconview.cxx
+++ b/vcl/source/treelist/iconview.cxx
@@ -151,10 +151,6 @@ void IconView::PaintEntry(SvTreeListEntry& rEntry, tools::Long nX, tools::Long n
}
aWallpaper.SetColor(aNewWallColor);
}
- else // no selection
- {
- aWallpaper.SetColor(rEntry.GetBackColor());
- }
Color aBackgroundColor = aWallpaper.GetColor();
if (aBackgroundColor != COL_TRANSPARENT)
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 9897f74e1113..25fcfb2ab02e 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -428,14 +428,12 @@ IMPL_LINK( SvTreeListBox, CloneHdl_Impl, SvTreeListEntry*, pEntry, SvTreeListEnt
sal_uInt32 SvTreeListBox::Insert( SvTreeListEntry* pEntry, SvTreeListEntry* pParent, sal_uInt32 nPos )
{
sal_uInt32 nInsPos = pModel->Insert( pEntry, pParent, nPos );
- pEntry->SetBackColor( GetBackground().GetColor() );
return nInsPos;
}
sal_uInt32 SvTreeListBox::Insert( SvTreeListEntry* pEntry,sal_uInt32 nRootPos )
{
sal_uInt32 nInsPos = pModel->Insert( pEntry, nRootPos );
- pEntry->SetBackColor( GetBackground().GetColor() );
return nInsPos;
}
@@ -2659,10 +2657,6 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl:
rRenderContext.SetTextColor(aBackupTextColor);
rRenderContext.SetFont(aBackupFont);
}
- else
- {
- aWallpaper.SetColor(rEntry.GetBackColor());
- }
}
// draw background
diff --git a/vcl/source/treelist/treelistentry.cxx b/vcl/source/treelist/treelistentry.cxx
index c369b733283b..59f9680d002e 100644
--- a/vcl/source/treelist/treelistentry.cxx
+++ b/vcl/source/treelist/treelistentry.cxx
@@ -54,7 +54,6 @@ SvTreeListEntry::SvTreeListEntry()
, mnExtraIndent(0)
, pUserData(nullptr)
, nEntryFlags(SvTLEntryFlags::NONE)
- , maBackColor(Application::GetSettings().GetStyleSettings().GetWindowColor())
{
}