--- qsampler/trunk/src/qsamplerInstrumentListForm.cpp 2007/11/23 09:32:06 1513 +++ qsampler/trunk/src/qsamplerInstrumentListForm.cpp 2007/11/26 10:58:23 1526 @@ -29,6 +29,8 @@ #include "qsamplerInstrument.h" #include "qsamplerMainForm.h" +#include + namespace QSampler { @@ -52,8 +54,25 @@ m_ui.InstrumentToolbar->addSeparator(); m_ui.InstrumentToolbar->addAction(m_ui.refreshInstrumentsAction); + int iRowHeight = m_ui.InstrumentTable->fontMetrics().height() + 4; + m_ui.InstrumentTable->verticalHeader()->setDefaultSectionSize(iRowHeight); + m_ui.InstrumentTable->setModel(&m_model); m_ui.InstrumentTable->setItemDelegate(&m_delegate); + m_ui.InstrumentTable->verticalHeader()->hide(); + + QHeaderView *pHeader = m_ui.InstrumentTable->horizontalHeader(); + pHeader->setDefaultAlignment(Qt::AlignLeft); + pHeader->setMovable(false); + pHeader->setStretchLastSection(true); + pHeader->resizeSection(0, 120); // Name + m_ui.InstrumentTable->resizeColumnToContents(1); // Map + m_ui.InstrumentTable->resizeColumnToContents(2); // Bank + m_ui.InstrumentTable->resizeColumnToContents(3); // Prog + m_ui.InstrumentTable->resizeColumnToContents(4); // Engine + pHeader->resizeSection(5, 240); // File + m_ui.InstrumentTable->resizeColumnToContents(6); // Nr + pHeader->resizeSection(7, 60); // vol QObject::connect(m_pMapComboBox, SIGNAL(activated(int)), @@ -208,7 +227,7 @@ if (oldInstrument.map() == pInstrument->map() && oldInstrument.bank() == pInstrument->bank() && oldInstrument.prog() == pInstrument->prog()) { - // just update tree item... + // Just update tree item... //pItem->update(); } else { // Unmap old instance...