Skip to content

Commit

Permalink
skins[-qt]: Inhibit focus rectangle for a single selected entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlindgren90 committed Sep 6, 2015
1 parent 8646f10 commit 015faab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/skins-qt/playlist-widget.cc
Expand Up @@ -248,7 +248,11 @@ void PlaylistWidget::draw (QPainter & cr)
/* focus rectangle */

int focus = aud_playlist_get_focus (m_playlist);
if (focus >= m_first && focus <= m_first + m_rows - 1)

/* don't show rectangle if this is the only selected entry */
if (focus >= m_first && focus <= m_first + m_rows - 1 &&
(! aud_playlist_entry_get_selected (m_playlist, focus) ||
aud_playlist_selected_count (m_playlist) > 1))
{
cr.setPen (QColor (skin.colors[SKIN_PLEDIT_NORMAL]));
cr.drawRect (0, m_offset + m_row_height * (focus - m_first), m_width - 1, m_row_height - 1);
Expand Down
6 changes: 5 additions & 1 deletion src/skins/playlist-widget.cc
Expand Up @@ -280,7 +280,11 @@ void PlaylistWidget::draw (cairo_t * cr)
/* focus rectangle */

int focus = aud_playlist_get_focus (m_playlist);
if (focus >= m_first && focus <= m_first + m_rows - 1)

/* don't show rectangle if this is the only selected entry */
if (focus >= m_first && focus <= m_first + m_rows - 1 &&
(! aud_playlist_entry_get_selected (m_playlist, focus) ||
aud_playlist_selected_count (m_playlist) > 1))
{
cairo_new_path (cr);
cairo_set_line_width (cr, 1);
Expand Down

0 comments on commit 015faab

Please sign in to comment.