From 713204e803e323a6a6e8eb2b49ab6d3d5a3b780c Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Mardelle Date: Fri, 27 Aug 2010 14:15:15 +0000 Subject: [PATCH] Ensure keyframe list widget is not too small to be used svn path=/trunk/kdenlive/; revision=4762 --- src/keyframeedit.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/keyframeedit.cpp b/src/keyframeedit.cpp index bf1a426d..1e450219 100644 --- a/src/keyframeedit.cpp +++ b/src/keyframeedit.cpp @@ -62,6 +62,8 @@ KeyframeEdit::KeyframeEdit(QDomElement e, int minFrame, int maxFrame, int minVal keyframe_list->setCurrentCell(0, 0); keyframe_list->selectRow(0); } + // ensure the keyframe list shows at least 3 lines + keyframe_list->setMinimumHeight(QFontInfo(keyframe_list->font()).pixelSize() * 9); /*m_delegate = new KeyItemDelegate(minVal, maxVal); keyframe_list->setItemDelegate(m_delegate);*/ } @@ -91,8 +93,8 @@ void KeyframeEdit::addParameter(QDomElement e) keyframe_list->setHorizontalHeaderItem(columnId, new QTableWidgetItem(paramName)); DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, 0, - m_params.at(columnId).attribute("min").toInt(), m_params.at(columnId).attribute("max").toInt(), - m_params.at(columnId).attribute("default").toInt(), m_params.at(columnId).attribute("suffix"), this); + m_params.at(columnId).attribute("min").toInt(), m_params.at(columnId).attribute("max").toInt(), + m_params.at(columnId).attribute("default").toInt(), m_params.at(columnId).attribute("suffix"), this); connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int))); m_slidersLayout->addWidget(doubleparam, columnId, 0); @@ -136,8 +138,8 @@ void KeyframeEdit::setupParam() m_slidersLayout = new QGridLayout(param_sliders); DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, 0, - m_params.at(0).attribute("min").toInt(), m_params.at(0).attribute("max").toInt(), - m_params.at(0).attribute("default").toInt(), m_params.at(0).attribute("suffix"), this); + m_params.at(0).attribute("min").toInt(), m_params.at(0).attribute("max").toInt(), + m_params.at(0).attribute("default").toInt(), m_params.at(0).attribute("suffix"), this); connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustKeyframeValue(int))); m_slidersLayout->addWidget(doubleparam, 0, 0); -- 2.39.2