]> git.sesse.net Git - kdenlive/commitdiff
Small fix for clipproperties dialog (improve column resizing in metadata and other...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 30 Jan 2013 00:40:34 +0000 (01:40 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 30 Jan 2013 00:40:34 +0000 (01:40 +0100)
src/clipproperties.cpp
src/clipproperties.h

index 9ba02d3c211a23c3953bf72131316b79dbe53eb6..c3562a9310e595dbd0729b925e8cc9fd41f4d2d4 100644 (file)
@@ -499,6 +499,10 @@ ClipProperties::ClipProperties(DocClipBase *clip, Timecode tc, double fps, QWidg
     connect(this, SIGNAL(accepted()), this, SLOT(slotApplyProperties()));
     connect(m_view.buttonBox->button(QDialogButtonBox::Apply), SIGNAL(clicked()), this, SLOT(slotApplyProperties()));
     m_view.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
+    
+    m_view.metadata_list->resizeColumnToContents(0);
+    m_view.clip_vproperties->resizeColumnToContents(0);
+    m_view.clip_aproperties->resizeColumnToContents(0);
     adjustSize();
 }
 
index 690de2381b7e85bd99ee8bb7d90423f80c7e5df0..075e13f08b6473ad0b9cf352f8602c29e9616eb6 100644 (file)
@@ -33,10 +33,10 @@ class PropertiesViewDelegate : public QStyledItemDelegate
     Q_OBJECT
 public:
     PropertiesViewDelegate(QWidget *parent) : QStyledItemDelegate(parent) {
-        m_height = parent->fontMetrics().height() * 1.5;
+        m_height = parent->fontMetrics().height() * 1.2;
     }
-    virtual QSize sizeHint(const QStyleOptionViewItem &, const QModelIndex &) const {
-        return QSize(10, m_height);
+    virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const {
+        return QSize(QStyledItemDelegate::sizeHint(option, index).width(), m_height);
     }
 private:
     int m_height;