diff --git a/common/lib_tree_model_adapter.cpp b/common/lib_tree_model_adapter.cpp index f9dfd5eff0..e7691ffc93 100644 --- a/common/lib_tree_model_adapter.cpp +++ b/common/lib_tree_model_adapter.cpp @@ -91,7 +91,7 @@ public: // We should be able to pass wxDATAVIEW_CELL_SELECTED into RenderText() and have it do // the right thing -- but it picks wxSYS_COLOUR_HIGHLIGHTTEXT on MacOS and GTK (instead // of wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT). - if ( aState & wxDATAVIEW_CELL_SELECTED ) + if( aState & wxDATAVIEW_CELL_SELECTED ) dc->SetTextForeground( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) ); aRect.Deflate( 1 ); diff --git a/eeschema/symbol_tree_synchronizing_adapter.cpp b/eeschema/symbol_tree_synchronizing_adapter.cpp index 4afb0ceeab..47f7fe01d1 100644 --- a/eeschema/symbol_tree_synchronizing_adapter.cpp +++ b/eeschema/symbol_tree_synchronizing_adapter.cpp @@ -329,22 +329,11 @@ bool SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, un // mark the current library if it's collapsed if( curSymbol && curSymbol->GetLibId().GetLibNickname() == node->m_LibId.GetLibNickname() ) { -#if 1 if( !m_widget->IsExpanded( ToItem( node ) ) ) { - // LIB_TREE_RENDERER uses strikethrough as a proxy for is-canvas-item - aAttr.SetStrikethrough( true ); + aAttr.SetStrikethrough( true ); // LIB_TREE_RENDERER uses strikethrough as a + // proxy for "is canvas item" } -#else -#ifdef __WXGTK__ - // The native wxGTK+ impl ignores background colour, so set the text colour instead. - // This works reasonably well in dark themes, and quite poorly in light ones.... - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); -#else - aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) ); -#endif -#endif } break; @@ -358,19 +347,8 @@ bool SYMBOL_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, un // mark the current (on-canvas) part if( curSymbol && curSymbol->GetLibId() == node->m_LibId ) { -#if 1 - // LIB_TREE_RENDERER uses strikethrough as a proxy for is-canvas-item - aAttr.SetStrikethrough( true ); -#else -#ifdef __WXGTK__ - // The native wxGTK+ impl ignores background colour, so set the text colour instead. - // This works reasonably well in dark themes, and quite poorly in light ones.... - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); -#else - aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) ); -#endif -#endif + aAttr.SetStrikethrough( true ); // LIB_TREE_RENDERER uses strikethrough as a + // proxy for "is canvas item" } break; diff --git a/pcbnew/fp_tree_synchronizing_adapter.cpp b/pcbnew/fp_tree_synchronizing_adapter.cpp index 8cf8f9b4b9..f91f34396c 100644 --- a/pcbnew/fp_tree_synchronizing_adapter.cpp +++ b/pcbnew/fp_tree_synchronizing_adapter.cpp @@ -280,14 +280,12 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsign case LIB_TREE_NODE::LIBRARY: if( node->m_Name == m_frame->GetLoadedFPID().GetLibNickname() ) { -#ifdef __WXGTK__ - // The native wxGTK+ impl ignores background colour, so set the text colour - // instead. Works reasonably well in dark themes, less well in light ones.... - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); -#else - aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) ); -#endif + // mark the current library if it's collapsed + if( !m_widget->IsExpanded( ToItem( node ) ) ) + { + aAttr.SetStrikethrough( true ); // LIB_TREE_RENDERER uses strikethrough as a + // proxy for "is canvas item" + } // mark modified libs with bold font if( m_frame->GetScreen()->IsContentModified() && !m_frame->IsCurrentFPFromBoard() ) @@ -298,14 +296,9 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::GetAttr( wxDataViewItem const& aItem, unsign case LIB_TREE_NODE::ITEM: if( node->m_LibId == m_frame->GetLoadedFPID() ) { -#ifdef __WXGTK__ - // The native wxGTK+ impl ignores background colour, so set the text colour - // instead. Works reasonably well in dark themes, less well in light ones.... - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); -#else - aAttr.SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); - aAttr.SetColour( wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXHIGHLIGHTTEXT ) ); -#endif + // mark the current (on-canvas) part + aAttr.SetStrikethrough( true ); // LIB_TREE_RENDERER uses strikethrough as a + // proxy for "is canvas item" // mark modified part with bold font if( m_frame->GetScreen()->IsContentModified() && !m_frame->IsCurrentFPFromBoard() )