Fix background colour drawing in wxGenericTreeCtrl under Mac
Revert8535cde836
(Remove apparently unnecessary m_hasExplicitFont, 2020-07-14) and make9cd3ab5ebd
(Improve wxGenericTreeCtrl colours/fonts updating on theme change, 2020-07-14) really work as expected by using not only m_hasExplicitFont, but also m_hasExplicit{Fg,Bg}Col in order to ensure that we only update the attributes if they hadn't been explicitly set. This is necessary because the hack with reusing m_has{Fg,Bg}Col didn't work under Mac where the colour wasn't used at all when they were false. This still seems to be a problem as the behaviour is different from that of the other ports, but fixing this in wxOSX doesn't seem to be simple, so don't rely on this working and use separate variables instead. Closes #18940.
This commit is contained in:
@@ -365,6 +365,14 @@ private:
|
||||
// operation.
|
||||
void ResetFindState();
|
||||
|
||||
|
||||
// True if we're using custom colours/font, respectively, or false if we're
|
||||
// using the default colours and should update them whenever system colours
|
||||
// change.
|
||||
bool m_hasExplicitFgCol:1,
|
||||
m_hasExplicitBgCol:1,
|
||||
m_hasExplicitFont:1;
|
||||
|
||||
wxDECLARE_EVENT_TABLE();
|
||||
wxDECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl);
|
||||
wxDECLARE_NO_COPY_CLASS(wxGenericTreeCtrl);
|
||||
|
Reference in New Issue
Block a user