Skip to content

Commit

Permalink
Небольшая доработка для плейлиста.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksoid1978 committed May 4, 2024
1 parent b2e98fe commit 08a0a10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
11 changes: 3 additions & 8 deletions src/apps/mplayerc/PlayerPlaylistBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ bool CPlaylistItem::FindFolder(LPCWSTR path) const
return false;
}

CString CPlaylistItem::GetLabel(int i)
CString CPlaylistItem::GetLabel(int i) const
{
CString str;

Expand Down Expand Up @@ -2446,6 +2446,7 @@ void CPlayerPlaylistBar::SetCurValid(const bool bValid)
m_list.SetItemText(index, COL_NAME, pli.GetLabel(0));
}
}
m_list.Invalidate();
}
break;
}
Expand Down Expand Up @@ -2900,13 +2901,7 @@ void CPlayerPlaylistBar::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruc

pDC->SetTextColor(textcolor);

CString time;
if (pli.m_bInvalid) {
time = ResStr(IDS_PLAYLIST_INVALID);
} else {
time = m_list.GetItemText(nItem, COL_TIME);
}

CString time = pli.GetLabel(1);
if (time.GetLength()) {
CSize timesize = pDC->GetTextExtent(time);
if ((3 + timesize.cx + 3) < rcItem.Width() / 2) {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/mplayerc/PlayerPlaylistBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CPlaylistItem
bool FindFolder(LPCWSTR path) const;
void AutoLoadFiles();

CString GetLabel(int i = 0);
CString GetLabel(int i = 0) const;

const bool MustBeSkipped() const {
if (m_bInvalid) {
Expand Down

0 comments on commit 08a0a10

Please sign in to comment.