]> git.sesse.net Git - kdenlive/blobdiff - src/projectlist.cpp
Make sure icons have small size with non KDE window manager
[kdenlive] / src / projectlist.cpp
index 66842bc61083bbba73e025174ec2daee482fb8a3..1a25cf3d7beff7871f39738f8bffb50ffb380320 100644 (file)
@@ -130,22 +130,25 @@ ProjectList::ProjectList(QWidget *parent) :
     frame->setFrameStyle(QFrame::NoFrame);
     QHBoxLayout *box = new QHBoxLayout;
     KTreeWidgetSearchLine *searchView = new KTreeWidgetSearchLine;
-
     box->addWidget(searchView);
-    //int s = style()->pixelMetric(QStyle::PM_SmallIconSize);
-    //m_toolbar->setIconSize(QSize(s, s));
+
+    int size = style()->pixelMetric(QStyle::PM_SmallIconSize);
+    QSize iconSize(size, size);
 
     m_addButton = new QToolButton;
     m_addButton->setPopupMode(QToolButton::MenuButtonPopup);
     m_addButton->setAutoRaise(true);
+    m_addButton->setIconSize(iconSize);
     box->addWidget(m_addButton);
 
     m_editButton = new QToolButton;
     m_editButton->setAutoRaise(true);
+    m_editButton->setIconSize(iconSize);
     box->addWidget(m_editButton);
 
     m_deleteButton = new QToolButton;
     m_deleteButton->setAutoRaise(true);
+    m_deleteButton->setIconSize(iconSize);
     box->addWidget(m_deleteButton);
     frame->setLayout(box);
     layout->addWidget(frame);
@@ -1852,7 +1855,6 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
         }
         item->setProperties(properties, metadata);
         clip->setProducer(producer, replace);
-        clip->getAudioThumbs();
 
         // Proxy stuff
         QString size = properties.value("frame_size");
@@ -2682,7 +2684,7 @@ void ProjectList::updateProxyConfig()
                 newProps.insert("replace", "1");
                 // insert required duration for proxy
                 newProps.insert("proxy_out", item->referencedClip()->producerProperty("out"));
-                new EditClipCommand(this, item->clipId(), item->referencedClip()->properties(), newProps, true, command);
+                new EditClipCommand(this, item->clipId(), item->referencedClip()->currentProperties(newProps), newProps, true, command);
             }
         }
         else if (t == IMAGE && item->referencedClip() != NULL) {
@@ -2805,7 +2807,7 @@ void ProjectList::slotDeleteProxy(const QString proxyPath)
             if (item->referencedClip()->getProperty("proxy") == proxyPath) {
                 QMap <QString, QString> props;
                 props.insert("proxy", QString());
-                new EditClipCommand(this, item->clipId(), item->referencedClip()->properties(), props, true, proxyCommand);
+                new EditClipCommand(this, item->clipId(), item->referencedClip()->currentProperties(props), props, true, proxyCommand);
             
             }
         }
@@ -2834,6 +2836,10 @@ void ProjectList::setProxyStatus(ProjectItem *item, PROXYSTATUS status, int prog
             QDomElement xml = clip->toXML();
             m_render->getFileProperties(xml, clip->getId(), m_listView->iconSize().height(), true);
         }
+        else {
+            // Disable proxy for this clip
+            clip->setProperty("proxy", "-");
+        }
     }
     monitorItemEditing(true);
 }