wxwidgets/src
Vadim Zeitlin fe420caa3b Fix background colour for empty cells in generic wxDataViewCtrl
There were two related problems: first, any attempts to set the
background colour for the cells without values were simply ignored
because we didn't call wxDataViewModel::GetAttr() at all from
PrepareForItem() in this case and, second, PrepareForItem() itself was
not called when repainting the control neither, resulting in the
existing attribute being reused for the items without values, meaning
that they used the last background colour that was set instead of at
least not using any background at all.

Fix both of the problems for the generic version. Unfortunately the GTK
one still doesn't allow setting the background for the empty cells, but
at least when not doing it the code now consistently leaves them without
any background.

The following code can be added to MyMusicTreeModel in the dataview
sample for testing this:

--------------------------------- >8 --------------------------------------
    bool GetAttr( const wxDataViewItem& item, unsigned int col, wxDataViewItemAttr& attr) const override
    {
        if (col != 1)
            return false;

        if (IsContainer(item))
        {
            if (item != m_pop)
                return false;

            attr.SetBackgroundColour(*wxYELLOW);
        }
        else
        {
            attr.SetColour(*wxYELLOW);
            attr.SetBackgroundColour(*wxLIGHT_GREY);
        }

        return true;
    }
--------------------------------- >8 --------------------------------------

Closes #23708, #23902.
2023-09-30 15:14:20 +02:00
..
aui Don't stop wxWindowDestroyEvent processing in wxAuiManager 2023-08-25 17:24:16 +02:00
common Fix background colour for empty cells in generic wxDataViewCtrl 2023-09-30 15:14:20 +02:00
dfb Use std::unordered_map<> in wxDFB 2023-04-12 18:15:45 +01:00
expat@23b7f47ef6 Apply fix for CVE-2022-40674 to Expat submodule 2022-10-07 02:02:33 +02:00
generic Fix background colour for empty cells in generic wxDataViewCtrl 2023-09-30 15:14:20 +02:00
gtk Fix showing popup menu with GTK/Wayland without active event 2023-09-24 14:20:29 -07:00
html Fix default colours used by wxHtmlWindow in dark mode 2023-06-01 17:00:14 +01:00
jpeg@8524936115
msw Implement wxWebView::SetProxy() for Edge backend 2023-09-07 15:33:39 +02:00
osx Send key down events ourselves if macOS didn't do it 2023-07-28 13:24:51 +02:00
png@d675c669c8 Update libpng and libtiff to fix warnings with latest clang 2022-03-20 16:01:31 +01:00
propgrid Use range-based loop to iterate over wxPGProperty children 2023-09-22 23:39:53 +02:00
qt Merge branch 'qt-bmp-premult' of https://github.com/AliKet/wxWidgets 2023-09-30 15:07:13 +02:00
ribbon Fix wxRibbonToolBar::GetToolByPos() and DeleteToolByPos() 2023-04-18 14:37:04 +02:00
richtext Fix wxBufferedPaintDC scale in wxRichTextCtrl 2023-09-10 17:34:01 +02:00
stc Update Scintilla submodules to avoid warnings with -Wextra 2023-07-04 01:25:03 +02:00
tiff@227d3d489f Synchronize config.* files in submodules with top-level repository 2023-07-27 17:14:48 +02:00
univ Fix creating wxRadioBox with no items in wxUniv 2023-08-24 02:31:22 +02:00
unix Merge branch 'egl-isshown-fix' 2023-09-30 15:13:16 +02:00
x11 Initialize base class in copy ctor in the other ports too 2023-07-04 01:24:43 +02:00
xml Replace all remaining occurrences of wxScopedPtr 2023-03-06 23:53:13 +01:00
xrc Add support for specifying high DPI animations in XRC 2023-08-25 20:51:21 +02:00
zlib@a6c8900ecb Update bundled zlib to 1.2.13.1 2023-01-26 23:41:10 +01:00