File tree Expand file tree Collapse file tree 3 files changed +26
-24
lines changed Expand file tree Collapse file tree 3 files changed +26
-24
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ class WXDLLIMPEXP_CORE wxHeaderCtrlBase : public wxControl
250
250
// control, see wxHeaderCtrlSimple for a standalone version
251
251
// ----------------------------------------------------------------------------
252
252
253
- #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
253
+ #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) && !defined(__WX_FORCE_USE_HEADERCTRL_GENERIC__)
254
254
#include " wx/msw/headerctrl.h"
255
255
#else
256
256
#define wxHAS_GENERIC_HEADERCTRL
Original file line number Diff line number Diff line change @@ -411,9 +411,16 @@ void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical)
411
411
wxDCOverlay dcover (m_overlay, &dc);
412
412
dcover.Clear ();
413
413
414
- dc.SetPen (*wxBLUE);
415
- dc.SetBrush (*wxTRANSPARENT_BRUSH);
416
-
414
+ static const auto g_light_cyan_pen = wxPen{ wxColour{208 , 226 , 249 } };
415
+ static const auto g_light_cyan_brush = wxBrush{ wxColour{208 , 226 , 249 } };
416
+ if (wxSystemSettings::GetAppearance ().IsDark ()) {
417
+ dc.SetPen (g_light_cyan_pen);
418
+ dc.SetBrush (*wxTRANSPARENT_BRUSH);
419
+ }
420
+ else {
421
+ dc.SetPen (*wxBLUE);
422
+ dc.SetBrush (*wxTRANSPARENT_BRUSH);
423
+ }
417
424
// draw the phantom position of the column being dragged
418
425
int x = xPhysical - m_dragOffset;
419
426
int y = GetClientSize ().y ;
@@ -428,7 +435,10 @@ void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical)
428
435
{
429
436
static const int DROP_MARKER_WIDTH = 4 ;
430
437
431
- dc.SetBrush (*wxBLUE);
438
+ if (wxSystemSettings::GetAppearance ().IsDark ())
439
+ dc.SetBrush (g_light_cyan_brush);
440
+ else
441
+ dc.SetBrush (*wxBLUE);
432
442
if (hover_region == Region::LeftHalf){
433
443
dc.DrawRectangle (GetColStart (col) - DROP_MARKER_WIDTH/2 , 0 ,
434
444
DROP_MARKER_WIDTH, y);
Original file line number Diff line number Diff line change @@ -692,25 +692,17 @@ wxRendererXP::DrawHeaderButton(wxWindow *win,
692
692
}
693
693
694
694
wxCHECK_MSG ( dc.GetImpl (), -1 , wxT (" Invalid wxDC" ) );
695
-
696
- RECT r = ConvertToRECT (dc, rect);
697
-
698
- int state;
699
- if ( flags & wxCONTROL_PRESSED )
700
- state = HIS_PRESSED;
701
- else if ( flags & wxCONTROL_CURRENT )
702
- state = HIS_HOT;
703
- else
704
- state = HIS_NORMAL;
705
- ::DrawThemeBackground
706
- (
707
- hTheme,
708
- GetHdcOf (dc.GetTempHDC ()),
709
- HP_HEADERITEM,
710
- state,
711
- &r,
712
- NULL
713
- );
695
+
696
+ auto frame_bkg_color = win->GetBackgroundColour ();
697
+ auto bk_brush = wxBrush{ frame_bkg_color };
698
+ dc.SetBrush (bk_brush);
699
+ dc.SetPen (*wxTRANSPARENT_PEN);
700
+ dc.DrawRectangle (rect);
701
+ dc.SetPen (*wxLIGHT_GREY_PEN);
702
+ dc.DrawLine (rect.GetLeftTop (), rect.GetLeftBottom ());
703
+
704
+ if (params != nullptr )
705
+ params->m_labelColour = win->GetForegroundColour ();
714
706
715
707
// NOTE: Using the theme to draw HP_HEADERSORTARROW doesn't do anything.
716
708
// Why? If this can be fixed then draw the sort arrows using the theme
You can’t perform that action at this time.
0 commit comments