Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#31 Resizeable playlist, what about this one?

open
nobody
None
5
2009-05-12
2009-05-12
Oyashiro
No

Hi,

I saw the request about the resizeable playlist so i took a look at it.

I think a few line more in the playlist.cpp file give a nice result.

Changes
-Removing:
in void Playlist::createTable() line 149.
listView->horizontalHeader()->setResizeMode(COL_NAME, QHeaderView::Stretch);

-Adding:
in void Playlist::createTable() line 149.
listView->horizontalHeader()->setDefaultSectionSize(100);
listView->verticalHeader()->setDefaultSectionSize(15);

in void Playlist::saveSettings()
for (int n=0; n < COL_TIME; n++) {
set->setValue( QString("col_%1_size").arg(n), listView->horizontalHeader()->sectionSize(n));
}

in void Playlist::loadSettings()
int size;
for (int n=0; n < COL_TIME; n++) {
size = set->value( QString("col_%1_size").arg(n), -1 ).toInt();
listView->horizontalHeader()->resizeSection( n, size);
}

Comments are in the attached file.
Don't know if you see it the same way but no error on the few try i had.

Not sure if the "horizontalHeader()->resizeSection( int, int)" function should be in the "#if !DOCK_PLAYLIST".

Hope it can help.

Discussion

  • Oyashiro
    Oyashiro
    2009-05-12

    playlist.cpp 0.6.7 version with resizeable colunm

     
    Attachments
  • Moved to patches.