[Git][wxwidgets/wxwidgets][master] 6 commits: Fix context help popup appearance in dark mode in wxMSW

2 views
Skip to first unread message

Vadim Zeitlin (@_VZ_)

unread,
Jul 1, 2026, 10:55:38 AM (4 days ago) Jul 1
to wx-commi...@googlegroups.com

Vadim Zeitlin pushed to branch master at wxWidgets / wxWidgets

Commits:

  • 9b46b1d8
    by Steve Cornett at 2026-07-01T02:37:56+02:00
    Fix context help popup appearance in dark mode in wxMSW
    
    Fix Windows dark mode for context help popup by using
    wxSystemSettings::GetColour() instead of ::GetSysColor().
    
    Closes #26650.
    
  • 9956c25c
    by Blake-Madden at 2026-07-01T02:47:00+02:00
    Add parent distribution info to wxGetOsDescription()
    
    Add fields for the information about the distribution this one is based
    on to wxLinuxDistributionInfo and add them wxGetOsDescription() if
    available/applicable.
    
    Closes #26641.
    
  • 6c3b09b8
    by Blake-Madden at 2026-07-01T03:17:22+02:00
    Add wxWebViewConfiguration::DisableGPUAcceleration()
    
    This function may be called before creating any wxWebView objects in
    case of problems due to the use of hardware acceleration.
    
    Closes #26626.
    
  • 8b080b8c
    by Blake-Madden at 2026-07-01T03:19:51+02:00
    Add system color change responsiveness to ribbon
    
    Add new wxRibbonArtProvider::UpdateColoursFromSystem() and implement it
    in wxRibbonMSWArtProvider.
    
    Closes #26644.
    
  • aae2d706
    by Lunar-YZ at 2026-07-01T16:31:24+02:00
    Fix wxPG macros when wxNO_IMPLICIT_WXSTRING_ENCODING is defined
    
    Use wide-char literal string instead of an ASCII one to fix compilation.
    
    Closes #26651.
    
  • a04dceef
    by Vadim Zeitlin at 2026-07-01T16:34:39+02:00
    Test wxPropertyGrid macros with wxNO_IMPLICIT_WXSTRING_ENCODING
    
    Verify that these macros produce compilable code.
    
    See #26651.
    

25 changed files:

Changes:

  • include/wx/platinfo.h
    ... ... @@ -125,13 +125,17 @@ struct wxLinuxDistributionInfo
    125 125
         wxString Release;
    
    126 126
         wxString CodeName;
    
    127 127
         wxString Description;
    
    128
    +    wxString ParentName;
    
    129
    +    wxString ParentCodeName;
    
    128 130
     
    
    129 131
         bool operator==(const wxLinuxDistributionInfo& ldi) const
    
    130 132
         {
    
    131 133
             return Id == ldi.Id &&
    
    132 134
                    Release == ldi.Release &&
    
    133 135
                    CodeName == ldi.CodeName &&
    
    134
    -               Description == ldi.Description;
    
    136
    +               Description == ldi.Description &&
    
    137
    +               ParentName == ldi.ParentName &&
    
    138
    +               ParentCodeName == ldi.ParentCodeName;
    
    135 139
         }
    
    136 140
     
    
    137 141
         bool operator!=(const wxLinuxDistributionInfo& ldi) const
    

  • include/wx/propgrid/propgriddefs.h
    ... ... @@ -524,7 +524,7 @@ expdecl const classname& classname##RefFromVariant( const wxVariant& variant ) \
    524 524
     #define WX_PG_IMPLEMENT_VARIANT_DATA_GETTER(classname, expdecl) \
    
    525 525
     expdecl classname& operator << ( classname &value, const wxVariant &variant )\
    
    526 526
     {\
    
    527
    -    wxASSERT( variant.GetType() == #classname );\
    
    527
    +    wxASSERT( variant.GetType() == wxS(#classname) );\
    
    528 528
         \
    
    529 529
         classname##VariantData *data = (classname##VariantData*) variant.GetData();\
    
    530 530
         value = data->GetValue();\
    

  • include/wx/ribbon/art.h
    ... ... @@ -232,6 +232,10 @@ public:
    232 232
                             const wxColour& secondary,
    
    233 233
                             const wxColour& tertiary) = 0;
    
    234 234
     
    
    235
    +    // Called when the system colours change; override to recalculate colours
    
    236
    +    // from system settings.
    
    237
    +    virtual void UpdateColoursFromSystem() {}
    
    238
    +
    
    235 239
         virtual void DrawTabCtrlBackground(
    
    236 240
                             wxDC& dc,
    
    237 241
                             wxWindow* wnd,
    
    ... ... @@ -441,6 +445,8 @@ public:
    441 445
                              const wxColour& secondary,
    
    442 446
                              const wxColour& tertiary) override;
    
    443 447
     
    
    448
    +    void UpdateColoursFromSystem() override;
    
    449
    +
    
    444 450
         int GetTabCtrlHeight(
    
    445 451
                             wxReadOnlyDC& dc,
    
    446 452
                             wxWindow* wnd,
    

  • include/wx/ribbon/bar.h
    ... ... @@ -188,6 +188,7 @@ protected:
    188 188
         void DoEraseBackground(wxDC& dc);
    
    189 189
         void OnSize(wxSizeEvent& evt);
    
    190 190
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    191
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    191 192
         void OnMouseLeftDown(wxMouseEvent& evt);
    
    192 193
         void OnMouseLeftUp(wxMouseEvent& evt);
    
    193 194
         void OnMouseMiddleDown(wxMouseEvent& evt);
    

  • include/wx/ribbon/buttonbar.h
    ... ... @@ -185,6 +185,7 @@ protected:
    185 185
         void OnMouseDown(wxMouseEvent& evt);
    
    186 186
         void OnMouseUp(wxMouseEvent& evt);
    
    187 187
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    188
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    188 189
     
    
    189 190
         virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
    
    190 191
                                           wxSize relative_to) const override;
    

  • include/wx/ribbon/gallery.h
    ... ... @@ -88,6 +88,7 @@ protected:
    88 88
         void OnPaint(wxPaintEvent& evt);
    
    89 89
         void OnSize(wxSizeEvent& evt);
    
    90 90
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    91
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    91 92
         int GetScrollLineSize() const;
    
    92 93
     
    
    93 94
         virtual wxSize DoGetBestSize() const override;
    

  • include/wx/ribbon/page.h
    ... ... @@ -77,6 +77,7 @@ protected:
    77 77
         void OnPaint(wxPaintEvent& evt);
    
    78 78
         void OnSize(wxSizeEvent& evt);
    
    79 79
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    80
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    80 81
     
    
    81 82
         bool ExpandPanels(wxOrientation direction, int maximum_amount);
    
    82 83
         bool CollapsePanels(wxOrientation direction, int minimum_amount);
    

  • include/wx/ribbon/panel.h
    ... ... @@ -109,6 +109,7 @@ protected:
    109 109
         void OnKillFocus(wxFocusEvent& evt);
    
    110 110
         void OnChildKillFocus(wxFocusEvent& evt);
    
    111 111
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    112
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    112 113
     
    
    113 114
         void TestPositionForHover(const wxPoint& pos);
    
    114 115
         bool ShouldSendEventToDummy(wxEvent& evt);
    

  • include/wx/ribbon/toolbar.h
    ... ... @@ -175,6 +175,7 @@ protected:
    175 175
         void OnPaint(wxPaintEvent& evt);
    
    176 176
         void OnSize(wxSizeEvent& evt);
    
    177 177
         void OnDPIChanged(wxDPIChangedEvent& evt);
    
    178
    +    void OnSysColourChanged(wxSysColourChangedEvent& evt);
    
    178 179
     
    
    179 180
         virtual wxSize DoGetNextSmallerSize(wxOrientation direction,
    
    180 181
                                           wxSize relative_to) const override;
    

  • include/wx/webview.h
    ... ... @@ -172,6 +172,7 @@ public:
    172 172
         void SetDataPath(const wxString& path);
    
    173 173
         wxString GetDataPath() const;
    
    174 174
         bool EnablePersistentStorage(bool enable);
    
    175
    +    static bool DisableGPUAcceleration();
    
    175 176
     
    
    176 177
         const wxString& GetBackend() const { return m_backend; }
    
    177 178
     
    

  • interface/wx/platinfo.h
    ... ... @@ -131,6 +131,18 @@ struct wxLinuxDistributionInfo
    131 131
         wxString Release;           //!< The version of the distribution; e.g. "9.04"
    
    132 132
         wxString CodeName;          //!< The code name of the distribution; e.g. "jaunty"
    
    133 133
         wxString Description;       //!< The description of the distribution; e.g. "Ubuntu 9.04"
    
    134
    +    /**
    
    135
    +        The parent distribution name; e.g. "ubuntu debian".
    
    136
    +
    
    137
    +        @since 3.3.3
    
    138
    +    */
    
    139
    +    wxString ParentName;
    
    140
    +    /**
    
    141
    +        The upstream release codename; e.g. "noble".
    
    142
    +
    
    143
    +        @since 3.3.3
    
    144
    +    */
    
    145
    +    wxString ParentCodeName;
    
    134 146
     
    
    135 147
         bool operator==(const wxLinuxDistributionInfo& ldi) const;
    
    136 148
         bool operator!=(const wxLinuxDistributionInfo& ldi) const;
    

  • interface/wx/ribbon/art.h
    ... ... @@ -344,6 +344,15 @@ public:
    344 344
                             const wxColour& secondary,
    
    345 345
                             const wxColour& tertiary) = 0;
    
    346 346
     
    
    347
    +    /**
    
    348
    +        Called when the system colours change to allow the art provider to
    
    349
    +        update its colours. Override to recalculate colours from the current
    
    350
    +        system settings.
    
    351
    +
    
    352
    +        @since 3.3.3
    
    353
    +    */
    
    354
    +    virtual void UpdateColoursFromSystem() {}
    
    355
    +
    
    347 356
         /**
    
    348 357
             Draw the background of the tab region of a ribbon bar.
    
    349 358
     
    

  • interface/wx/utils.h
    ... ... @@ -844,6 +844,7 @@ bool wxGetUserName(char* buf, int sz);
    844 844
         Returns the string containing the description of the current platform in a
    
    845 845
         user-readable form. For example, this function may return strings like
    
    846 846
         "Windows 10 Pro 22H2 (build 19045), 64-bit edition",
    
    847
    +    "Linux Mint 22.3, based on ubuntu debian (noble), 6.18.36-generic x86_64",
    
    847 848
         "AlmaLinux 10.1 (Heliotrope Lion), 6.12.0-55.9.1.el10_0.x86_64",
    
    848 849
         or "Linux 4.1.4 i386".
    
    849 850
     
    

  • interface/wx/webview.h
    ... ... @@ -410,6 +410,27 @@ public:
    410 410
             @since 3.3.0
    
    411 411
          */
    
    412 412
         bool EnablePersistentStorage(bool enable);
    
    413
    +
    
    414
    +    /**
    
    415
    +        Disables GPU hardware acceleration for all subsequently created web
    
    416
    +        views.
    
    417
    +
    
    418
    +        This can be useful when diagnosing rendering issues or when targeting
    
    419
    +        machines with older or unsupported video cards.
    
    420
    +
    
    421
    +        This must be called @b before creating any wxWebView instance. Once
    
    422
    +        called, GPU acceleration will remain disabled for the lifetime of the
    
    423
    +        application.
    
    424
    +
    
    425
    +        @return @true if the setting was applied successfully, @false if it is
    
    426
    +            not supported by the currently used backend.
    
    427
    +
    
    428
    +        @note This is currently only implemented for the Edge (MSW) and
    
    429
    +            WebKit2GTK (GTK) backends.
    
    430
    +
    
    431
    +        @since 3.3.3
    
    432
    +    */
    
    433
    +    static bool DisableGPUAcceleration();
    
    413 434
     };
    
    414 435
     
    
    415 436
     
    
    ... ... @@ -918,12 +939,10 @@ public:
    918 939
         The predefined @c wxWebViewBackendWebKit constant contains the name of this
    
    919 940
         backend.
    
    920 941
     
    
    921
    -    @note WebKitGTK 2.42+ may fail to render content due to
    
    922
    -    DMA-BUF hardware acceleration issues. This can be resolved by calling
    
    923
    -    @code
    
    924
    -    wxSetEnv("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
    
    925
    -    @endcode
    
    926
    -    before creating a @c wxWebView instance.
    
    942
    +    @note WebKitGTK 2.42+ may fail to render content due to DMA-BUF hardware
    
    943
    +    acceleration issues. This can be resolved by calling
    
    944
    +    wxWebViewConfiguration::DisableGPUAcceleration() before creating a
    
    945
    +    @c wxWebView instance.
    
    927 946
     
    
    928 947
         @subsection wxWEBVIEW_WEBKIT_MACOS wxWEBVIEW_WEBKIT (macOS)
    
    929 948
     
    

  • src/common/webview.cpp
    ... ... @@ -490,6 +490,24 @@ wxWebView::GetBackendVersionInfo(const wxString& backend,
    490 490
             return wxVersionInfo();
    
    491 491
     }
    
    492 492
     
    
    493
    +// static
    
    494
    +bool wxWebViewConfiguration::DisableGPUAcceleration()
    
    495
    +{
    
    496
    +#if defined(__WXGTK__)
    
    497
    +    return wxSetEnv("WEBKIT_DISABLE_DMABUF_RENDERER", "1");
    
    498
    +#elif defined(__WXMSW__)
    
    499
    +    // Append to the existing arguments if any.
    
    500
    +    wxString args;
    
    501
    +    if ( wxGetEnv("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", &args) )
    
    502
    +        args += ' ';
    
    503
    +
    
    504
    +    args += "--disable-gpu";
    
    505
    +    return wxSetEnv("WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS", args);
    
    506
    +#else
    
    507
    +    return false;
    
    508
    +#endif
    
    509
    +}
    
    510
    +
    
    493 511
     wxWebViewConfiguration wxWebView::NewConfiguration(const wxString& backend)
    
    494 512
     {
    
    495 513
         wxStringWebViewFactoryMap::iterator iter = FindFactory(backend);
    

  • src/msw/helpchm.cpp
    ... ... @@ -153,8 +153,8 @@ wxCHMHelpController::DoDisplayTextPopup(const wxChar *text,
    153 153
         popup.pszText = text;
    
    154 154
         popup.pt.x = pos.x;
    
    155 155
         popup.pt.y = pos.y;
    
    156
    -    popup.clrForeground = ::GetSysColor(COLOR_INFOTEXT);
    
    157
    -    popup.clrBackground = ::GetSysColor(COLOR_INFOBK);
    
    156
    +    popup.clrForeground = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOTEXT).GetPixel();
    
    157
    +    popup.clrBackground = wxSystemSettings::GetColour(wxSYS_COLOUR_INFOBK).GetPixel();
    
    158 158
         popup.rcMargins.top =
    
    159 159
         popup.rcMargins.left =
    
    160 160
         popup.rcMargins.right =
    

  • src/ribbon/art_msw.cpp
    ... ... @@ -273,22 +273,7 @@ wxRibbonMSWArtProvider::wxRibbonMSWArtProvider(bool set_colour_scheme)
    273 273
         m_panel_label_font = m_tab_label_font;
    
    274 274
     
    
    275 275
         if(set_colour_scheme)
    
    276
    -    {
    
    277
    -        if (wxSystemSettings::GetAppearance().IsDark())
    
    278
    -        {
    
    279
    -            SetColourScheme(
    
    280
    -                wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE),
    
    281
    -                wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT),
    
    282
    -                wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
    
    283
    -        }
    
    284
    -        else
    
    285
    -        {
    
    286
    -            SetColourScheme(
    
    287
    -                wxColour(194, 216, 241),
    
    288
    -                wxColour(255, 223, 114),
    
    289
    -                wxColour(0, 0, 0));
    
    290
    -        }
    
    291
    -    }
    
    276
    +        UpdateColoursFromSystem();
    
    292 277
     
    
    293 278
         m_cached_tab_separator_visibility = -10.0; // valid visibilities are in range [0, 1]
    
    294 279
         m_tab_separation_size = 3;
    
    ... ... @@ -311,6 +296,24 @@ wxRibbonMSWArtProvider::~wxRibbonMSWArtProvider()
    311 296
     {
    
    312 297
     }
    
    313 298
     
    
    299
    +void wxRibbonMSWArtProvider::UpdateColoursFromSystem()
    
    300
    +{
    
    301
    +    if (wxSystemSettings::GetAppearance().IsDark())
    
    302
    +    {
    
    303
    +        SetColourScheme(
    
    304
    +            wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE),
    
    305
    +            wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT),
    
    306
    +            wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
    
    307
    +    }
    
    308
    +    else
    
    309
    +    {
    
    310
    +        SetColourScheme(
    
    311
    +            wxColour(194, 216, 241),
    
    312
    +            wxColour(255, 223, 114),
    
    313
    +            wxColour(0, 0, 0));
    
    314
    +    }
    
    315
    +}
    
    316
    +
    
    314 317
     void wxRibbonMSWArtProvider::GetColourScheme(
    
    315 318
                              wxColour* primary,
    
    316 319
                              wxColour* secondary,
    

  • src/ribbon/bar.cpp
    ... ... @@ -55,6 +55,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonBar, wxRibbonControl)
    55 55
       EVT_SIZE(wxRibbonBar::OnSize)
    
    56 56
       EVT_KILL_FOCUS(wxRibbonBar::OnKillFocus)
    
    57 57
       EVT_DPI_CHANGED(wxRibbonBar::OnDPIChanged)
    
    58
    +  EVT_SYS_COLOUR_CHANGED(wxRibbonBar::OnSysColourChanged)
    
    58 59
     wxEND_EVENT_TABLE()
    
    59 60
     
    
    60 61
     void wxRibbonBar::AddPage(wxRibbonPage *page)
    
    ... ... @@ -956,6 +957,12 @@ void wxRibbonBar::OnDPIChanged(wxDPIChangedEvent& event)
    956 957
         event.Skip();
    
    957 958
     }
    
    958 959
     
    
    960
    +void wxRibbonBar::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    961
    +{
    
    962
    +    event.Skip();
    
    963
    +    m_art->UpdateColoursFromSystem();
    
    964
    +}
    
    965
    +
    
    959 966
     void wxRibbonBar::RepositionPage(wxRibbonPage *page)
    
    960 967
     {
    
    961 968
         int w, h;
    

  • src/ribbon/buttonbar.cpp
    ... ... @@ -42,6 +42,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonButtonBar, wxRibbonControl)
    42 42
         EVT_LEFT_DCLICK(wxRibbonButtonBar::OnMouseDown)
    
    43 43
         EVT_LEFT_UP(wxRibbonButtonBar::OnMouseUp)
    
    44 44
         EVT_DPI_CHANGED(wxRibbonButtonBar::OnDPIChanged)
    
    45
    +    EVT_SYS_COLOUR_CHANGED(wxRibbonButtonBar::OnSysColourChanged)
    
    45 46
     wxEND_EVENT_TABLE()
    
    46 47
     
    
    47 48
     class wxRibbonButtonBarButtonSizeInfo
    
    ... ... @@ -1603,4 +1604,10 @@ void wxRibbonButtonBar::OnDPIChanged(wxDPIChangedEvent& event)
    1603 1604
         event.Skip();
    
    1604 1605
     }
    
    1605 1606
     
    
    1607
    +void wxRibbonButtonBar::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    1608
    +{
    
    1609
    +    event.Skip();
    
    1610
    +    m_art->UpdateColoursFromSystem();
    
    1611
    +}
    
    1612
    +
    
    1606 1613
     #endif // wxUSE_RIBBON

  • src/ribbon/gallery.cpp
    ... ... @@ -73,6 +73,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonGallery, wxRibbonControl)
    73 73
         EVT_PAINT(wxRibbonGallery::OnPaint)
    
    74 74
         EVT_SIZE(wxRibbonGallery::OnSize)
    
    75 75
         EVT_DPI_CHANGED(wxRibbonGallery::OnDPIChanged)
    
    76
    +    EVT_SYS_COLOUR_CHANGED(wxRibbonGallery::OnSysColourChanged)
    
    76 77
     wxEND_EVENT_TABLE()
    
    77 78
     
    
    78 79
     wxRibbonGallery::wxRibbonGallery()
    
    ... ... @@ -539,6 +540,12 @@ void wxRibbonGallery::OnDPIChanged(wxDPIChangedEvent& event)
    539 540
         event.Skip();
    
    540 541
     }
    
    541 542
     
    
    543
    +void wxRibbonGallery::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    544
    +{
    
    545
    +    event.Skip();
    
    546
    +    m_art->UpdateColoursFromSystem();
    
    547
    +}
    
    548
    +
    
    542 549
     wxRibbonGalleryItem* wxRibbonGallery::Append(const wxBitmapBundle& bitmap, int id)
    
    543 550
     {
    
    544 551
         wxASSERT(bitmap.IsOk());
    

  • src/ribbon/page.cpp
    ... ... @@ -149,6 +149,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonPage, wxRibbonControl)
    149 149
         EVT_PAINT(wxRibbonPage::OnPaint)
    
    150 150
         EVT_SIZE(wxRibbonPage::OnSize)
    
    151 151
         EVT_DPI_CHANGED(wxRibbonPage::OnDPIChanged)
    
    152
    +    EVT_SYS_COLOUR_CHANGED(wxRibbonPage::OnSysColourChanged)
    
    152 153
     wxEND_EVENT_TABLE()
    
    153 154
     
    
    154 155
     wxRibbonPage::wxRibbonPage()
    
    ... ... @@ -570,6 +571,12 @@ void wxRibbonPage::OnDPIChanged(wxDPIChangedEvent& event)
    570 571
         event.Skip();
    
    571 572
     }
    
    572 573
     
    
    574
    +void wxRibbonPage::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    575
    +{
    
    576
    +    event.Skip();
    
    577
    +    m_art->UpdateColoursFromSystem();
    
    578
    +}
    
    579
    +
    
    573 580
     void wxRibbonPage::RemoveChild(wxWindowBase *child)
    
    574 581
     {
    
    575 582
         // Remove all references to the child from the collapse stack
    

  • src/ribbon/panel.cpp
    ... ... @@ -43,6 +43,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonPanel, wxRibbonControl)
    43 43
         EVT_PAINT(wxRibbonPanel::OnPaint)
    
    44 44
         EVT_SIZE(wxRibbonPanel::OnSize)
    
    45 45
         EVT_DPI_CHANGED(wxRibbonPanel::OnDPIChanged)
    
    46
    +    EVT_SYS_COLOUR_CHANGED(wxRibbonPanel::OnSysColourChanged)
    
    46 47
     wxEND_EVENT_TABLE()
    
    47 48
     
    
    48 49
     wxRibbonPanel::wxRibbonPanel() : m_expanded_dummy(nullptr), m_expanded_panel(nullptr)
    
    ... ... @@ -259,6 +260,12 @@ void wxRibbonPanel::OnDPIChanged(wxDPIChangedEvent& event)
    259 260
         event.Skip();
    
    260 261
     }
    
    261 262
     
    
    263
    +void wxRibbonPanel::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    264
    +{
    
    265
    +    event.Skip();
    
    266
    +    m_art->UpdateColoursFromSystem();
    
    267
    +}
    
    268
    +
    
    262 269
     void wxRibbonPanel::DoSetSize(int x, int y, int width, int height, int sizeFlags)
    
    263 270
     {
    
    264 271
         // At least on MSW, changing the size of a window will cause GetSize() to
    

  • src/ribbon/toolbar.cpp
    ... ... @@ -71,6 +71,7 @@ wxBEGIN_EVENT_TABLE(wxRibbonToolBar, wxRibbonControl)
    71 71
         EVT_PAINT(wxRibbonToolBar::OnPaint)
    
    72 72
         EVT_SIZE(wxRibbonToolBar::OnSize)
    
    73 73
         EVT_DPI_CHANGED(wxRibbonToolBar::OnDPIChanged)
    
    74
    +    EVT_SYS_COLOUR_CHANGED(wxRibbonToolBar::OnSysColourChanged)
    
    74 75
     wxEND_EVENT_TABLE()
    
    75 76
     
    
    76 77
     wxRibbonToolBar::wxRibbonToolBar()
    
    ... ... @@ -986,6 +987,12 @@ void wxRibbonToolBar::OnDPIChanged(wxDPIChangedEvent& event)
    986 987
         event.Skip();
    
    987 988
     }
    
    988 989
     
    
    990
    +void wxRibbonToolBar::OnSysColourChanged(wxSysColourChangedEvent& event)
    
    991
    +{
    
    992
    +    event.Skip();
    
    993
    +    m_art->UpdateColoursFromSystem();
    
    994
    +}
    
    995
    +
    
    989 996
     // Finds the best width and height given the parents' width and height
    
    990 997
     wxSize wxRibbonToolBar::GetBestSizeForParentSize(const wxSize& parentSize) const
    
    991 998
     {
    

  • src/unix/utilsunx.cpp
    ... ... @@ -1152,6 +1152,8 @@ wxGetValuesFromOSRelease(const wxString& filename, wxLinuxDistributionInfo& ret)
    1152 1152
         ret.Description = fc.Read(wxS("PRETTY_NAME"), wxEmptyString);
    
    1153 1153
         ret.Release = fc.Read(wxS("VERSION_ID"), wxEmptyString);
    
    1154 1154
         ret.CodeName = fc.Read(wxS("VERSION_CODENAME"), wxEmptyString);
    
    1155
    +    ret.ParentName = fc.Read(wxS("ID_LIKE"), wxEmptyString);
    
    1156
    +    ret.ParentCodeName = fc.Read(wxS("UBUNTU_CODENAME"), wxEmptyString);
    
    1155 1157
     
    
    1156 1158
         return true;
    
    1157 1159
     #else
    
    ... ... @@ -1254,7 +1256,8 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin, int *verMicro)
    1254 1256
     }
    
    1255 1257
     
    
    1256 1258
     static bool
    
    1257
    -wxGetDescFromOSRelease(wxString* distName, wxString* version)
    
    1259
    +wxGetDescFromOSRelease(wxString* distName, wxString* version,
    
    1260
    +                       wxString* parentName, wxString* parentCodeName)
    
    1258 1261
     {
    
    1259 1262
     #if wxUSE_CONFIG
    
    1260 1263
         // Read /etc/os-release and fall back to /usr/lib/os-release per below
    
    ... ... @@ -1278,6 +1281,9 @@ wxGetDescFromOSRelease(wxString* distName, wxString* version)
    1278 1281
     
    
    1279 1282
                 *version = fc.Read("VERSION");
    
    1280 1283
     
    
    1284
    +            *parentName = fc.Read("ID_LIKE");
    
    1285
    +            *parentCodeName = fc.Read("UBUNTU_CODENAME");
    
    1286
    +
    
    1281 1287
                 return true;
    
    1282 1288
             }
    
    1283 1289
         }
    
    ... ... @@ -1291,14 +1297,32 @@ wxString wxGetOsDescription()
    1291 1297
     #ifdef __VMS
    
    1292 1298
         return wxGetCommandOutput(wxT("uname -s -v -m"));
    
    1293 1299
     #else
    
    1294
    -    wxString distName, version;
    
    1295
    -    if ( wxGetDescFromOSRelease(&distName, &version) )
    
    1300
    +    wxString distName, version, parentName, parentCodeName;
    
    1301
    +    if ( wxGetDescFromOSRelease(&distName, &version, &parentName, &parentCodeName) )
    
    1296 1302
         {
    
    1297 1303
             wxString osDesc = distName;
    
    1298 1304
             if ( !version.empty() )
    
    1299 1305
             {
    
    1300 1306
                 osDesc += " " + version;
    
    1301 1307
             }
    
    1308
    +        if ( !parentName.empty() )
    
    1309
    +        {
    
    1310
    +            if ( !parentCodeName.empty() )
    
    1311
    +            {
    
    1312
    +                /* TRANSLATORS: first %s is a Linux distribution parent name, second %s is its codename. */
    
    1313
    +                osDesc += wxString::Format(_(", based on %s (%s)"), parentName, parentCodeName);
    
    1314
    +            }
    
    1315
    +            else
    
    1316
    +            {
    
    1317
    +                /* TRANSLATORS: %s is a Linux distribution parent name. */
    
    1318
    +                osDesc += wxString::Format(_(", based on %s"), parentName);
    
    1319
    +            }
    
    1320
    +        }
    
    1321
    +        else if ( !parentCodeName.empty() )
    
    1322
    +        {
    
    1323
    +            /* TRANSLATORS: %s is an upstream codename. */
    
    1324
    +            osDesc += wxString::Format(_(", based on %s"), parentCodeName);
    
    1325
    +        }
    
    1302 1326
             osDesc += ",";
    
    1303 1327
     
    
    1304 1328
             const wxString unameSystem = wxGetCommandOutput(wxT("uname -s"));
    

  • tests/allheaders.cpp
    ... ... @@ -428,3 +428,7 @@ TEST_CASE("wxNO_IMPLICIT_WXSTRING_ENCODING", "[string]")
    428 428
         wxPLURAL(L"sing", L"plur", 3);
    
    429 429
         wxGETTEXT_IN_CONTEXT_PLURAL(L"context", L"sing", L"plur", 3);
    
    430 430
     }
    
    431
    +
    
    432
    +// Check that wxPropertyGrid macros compile without warnings too.
    
    433
    +WX_PG_DECLARE_VARIANT_DATA(wxArrayDouble)
    
    434
    +WX_PG_IMPLEMENT_VARIANT_DATA_DUMMY_EQ(wxArrayDouble)

Reply all
Reply to author
Forward
0 new messages