@@ -232,7 +232,7 @@ unsigned int wxHeaderCtrl::FindColumnAfter(const unsigned int column_idx) const{
232
232
// auto target_column_found = false;
233
233
for ( unsigned n = 0 ; n < count; n++ )
234
234
{
235
- if (m_colIndices[n] == column_idx && n + 1 < count ){
235
+ if (static_cast < unsigned >( m_colIndices[n]) == column_idx && n + 1 < count ){
236
236
after_idx = m_colIndices[n + 1 ];
237
237
break ;
238
238
}
@@ -246,13 +246,13 @@ unsigned int wxHeaderCtrl::FindColumnBefore(const unsigned int column_idx) const
246
246
auto target_column_found = false ;
247
247
for ( unsigned n = 0 ; n < count; n++ )
248
248
{
249
- if (m_colIndices[n] == column_idx){
249
+ if (static_cast < unsigned >( m_colIndices[n]) == column_idx){
250
250
target_column_found = true ;
251
251
break ;
252
252
}
253
253
before_idx = m_colIndices[n];
254
254
}
255
- if (not target_column_found)
255
+ if (! target_column_found)
256
256
before_idx = COL_NONE;
257
257
return before_idx;
258
258
}
@@ -404,17 +404,17 @@ void wxHeaderCtrl::EndResizing(int xPhysical)
404
404
m_colBeingResized = COL_NONE;
405
405
}
406
406
407
+ wxColor wxHeaderCtrl::g_clDarkModeDragBorder;
408
+
407
409
void wxHeaderCtrl::UpdateReorderingMarker (int xPhysical)
408
410
{
409
411
wxClientDC dc (this );
410
412
411
413
wxDCOverlay dcover (m_overlay, &dc);
412
414
dcover.Clear ();
413
415
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);
416
+ if (wxSystemSettings::GetAppearance ().IsDark () && g_clDarkModeDragBorder.IsOk ()) {
417
+ dc.SetPen (g_clDarkModeDragBorder);
418
418
dc.SetBrush (*wxTRANSPARENT_BRUSH);
419
419
}
420
420
else {
@@ -435,8 +435,8 @@ void wxHeaderCtrl::UpdateReorderingMarker(int xPhysical)
435
435
{
436
436
static const int DROP_MARKER_WIDTH = 4 ;
437
437
438
- if (wxSystemSettings::GetAppearance ().IsDark ())
439
- dc.SetBrush (g_light_cyan_brush );
438
+ if (wxSystemSettings::GetAppearance ().IsDark () && g_clDarkModeDragBorder. IsOk () )
439
+ dc.SetBrush (g_clDarkModeDragBorder );
440
440
else
441
441
dc.SetBrush (*wxBLUE);
442
442
if (hover_region == Region::LeftHalf){
@@ -553,7 +553,7 @@ bool wxHeaderCtrl::EndReordering(int xPhysical)
553
553
MoveColumnInOrderArray (new_colIndices, colOld, new_pos);
554
554
auto old_after_pos = new_colIndices.Index (colNew);
555
555
auto new_after_pos = new_colIndices.Index (colOld);
556
- if (old_after_pos != old_pos || new_after_pos != new_pos || move_left || old_pos > new_pos){
556
+ if (static_cast < unsigned >( old_after_pos) != old_pos || static_cast < unsigned >( new_after_pos) != new_pos || move_left || old_pos > new_pos){
557
557
event.SetNewOrder (new_pos);
558
558
559
559
// printf("Move col %d to %d, pos to %d\n", colOld, colNew, new_pos);
0 commit comments