]> git.sesse.net Git - kdenlive/commitdiff
improvements to effect stack UI & fix timeline keyframes not refreshing
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 6 Apr 2012 02:46:33 +0000 (04:46 +0200)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Fri, 6 Apr 2012 02:46:33 +0000 (04:46 +0200)
13 files changed:
icons/CMakeLists.txt
icons/novisible.png [new file with mode: 0644]
icons/visible.png [new file with mode: 0644]
src/clipitem.cpp
src/clipitem.h
src/customtrackview.cpp
src/effectstack/collapsibleeffect.cpp
src/effectstack/collapsibleeffect.h
src/effectstack/collapsiblegroup.cpp
src/effectstack/effectstackview2.cpp
src/widgets/collapsiblegroup_ui.ui
src/widgets/collapsiblewidget_ui.ui
src/widgets/keyframeeditor_ui.ui

index c41644a6a9fc09970c4812ff8876b9176d87a32e..3919780086a975529d89fb8d2e7bef52e0885b8a 100644 (file)
@@ -1,3 +1,8 @@
-#FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.svg*")
-kde4_install_icons( ${DATA_INSTALL_DIR}/kdenlive/icons )
-#install( FILES ${files} DESTINATION ${ICON_INSTALL_DIR} )
+install(FILES
+    visible.png        
+    novisible.png
+    DESTINATION ${DATA_INSTALL_DIR}/kdenlive/pics)
+    
+kde4_install_icons( ${ICON_INSTALL_DIR}   )
+
+
diff --git a/icons/novisible.png b/icons/novisible.png
new file mode 100644 (file)
index 0000000..28df3a0
Binary files /dev/null and b/icons/novisible.png differ
diff --git a/icons/visible.png b/icons/visible.png
new file mode 100644 (file)
index 0000000..9c1f230
Binary files /dev/null and b/icons/visible.png differ
index 0408213873ae4a679776bc7018e66d7927fd8247..3e77c933efc6db01a22d32f67c762951fd61582a 100644 (file)
@@ -1371,7 +1371,7 @@ QDomElement ClipItem::getEffectAt(int ix) const
     return m_effectList.itemFromIndex(ix);
 }
 
-bool ClipItem::updateEffect(QDomElement effect)
+void ClipItem::updateEffect(QDomElement effect)
 {
     //kDebug() << "CHange EFFECT AT: " << ix << ", CURR: " << m_effectList.at(ix).attribute("tag") << ", NEW: " << effect.attribute("tag");
     m_effectList.updateEffect(effect);
@@ -1384,7 +1384,6 @@ bool ClipItem::updateEffect(QDomElement effect)
         r.setHeight(20);
         update(r);
     }
-    return true;
 }
 
 bool ClipItem::moveEffect(QDomElement effect, int ix)
index f5c8a5b8f8cc682dacbca10ae84fa5831d50c7ba..682bb9fc07ceb5d435810c0373768c37afd2aa8a 100644 (file)
@@ -99,7 +99,7 @@ public:
     /** @brief Replaces an effect.
     * @param ix The effect's index in effectlist
     * @param effect The new effect */
-    bool updateEffect(QDomElement effect);
+    void updateEffect(QDomElement effect);
     bool moveEffect(QDomElement effect, int ix);
     void flashClip();
     void addTransition(Transition*);
index bfa14d95cda11ba5d2f15d01274bb11baf5f95fd..6a28783f1f0b850167bc359720fba832772cf51b 100644 (file)
@@ -1941,13 +1941,12 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
                 if (strobe == 0) strobe = 1;
                 doChangeClipSpeed(clip->info(), clip->speedIndependantInfo(), speed, clip->speed(), strobe, clip->baseClip()->getId());
             }
-            if (clip->updateEffect(effect)) {
-               if (updateEffectStack && clip->isSelected())
-                       emit clipItemSelected(clip, ix);
-               /*if (ix == clip->selectedEffectIndex()) {
-                   clip->setSelectedEffect(ix);
-                   
-               }*/
+            clip->updateEffect(effect);
+           if (updateEffectStack && clip->isSelected())
+               emit clipItemSelected(clip, ix);
+           if (ix == clip->selectedEffectIndex()) {
+               // make sure to update display of clip keyframes
+               clip->setSelectedEffect(ix);
            } else emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
             return;
         }
@@ -1972,13 +1971,15 @@ void CustomTrackView::updateEffect(int track, GenTime pos, QDomElement insertedE
         }
        bool success = m_document->renderer()->mltEditEffect(m_document->tracksCount() - clip->track(), clip->startPos(), effectParams);
 
-        if (success && clip->updateEffect(effect)) {
+        if (success) {
+           clip->updateEffect(effect);
            if (updateEffectStack && clip->isSelected()) {
                emit clipItemSelected(clip, ix);
            }
-           /*if (ix == clip->selectedEffectIndex()) {
+           if (ix == clip->selectedEffectIndex()) {
+               // make sure to update display of clip keyframes
                clip->setSelectedEffect(ix);
-           }*/
+           }
        }
        else emit displayMessage(i18n("Problem editing effect"), ErrorMessage);
     }
index 5dae8b3557b49b1d134446fcc80495e3f7bb18c9..ecb28ff2cfd2433a863872aec3972da986363361 100644 (file)
@@ -59,6 +59,7 @@
 #include <KFileDialog>
 #include <KUrlRequester>
 #include <KColorScheme>
+#include <KColorUtils>
 
 class Boolval: public QWidget, public Ui::Boolval_UI
 {
@@ -131,7 +132,6 @@ CollapsibleEffect::CollapsibleEffect(QDomElement effect, QDomElement original_ef
     filterWheelEvent = true;
     m_info.fromString(effect.attribute("kdenlive_info"));
     setFont(KGlobalSettings::smallestReadableFont());
-   
     buttonUp->setIcon(KIcon("kdenlive-up"));
     buttonUp->setToolTip(i18n("Move effect up"));
     if (!lastEffect) {
@@ -157,13 +157,16 @@ CollapsibleEffect::CollapsibleEffect(QDomElement effect, QDomElement original_ef
     QDomElement namenode = m_effect.firstChildElement("name");
     if (namenode.isNull()) return;
     title->setText(i18n(namenode.text().toUtf8().data()));
+    /*
+     * Do not show icon, makes too much visual noise
     QString type = m_effect.attribute("type", QString());
     KIcon icon;
     if (type == "audio") icon = KIcon("kdenlive-show-audio");
     else if (m_effect.attribute("tag") == "region") icon = KIcon("kdenlive-mask-effect");
     else if (type == "custom") icon = KIcon("kdenlive-custom-effect");
     else icon = KIcon("kdenlive-show-video");
-    effecticon->setPixmap(icon.pixmap(16,16));
+    effecticon->setPixmap(icon.pixmap(16,16));*/
+    
     m_menu->addAction(KIcon("folder-new"), i18n("Create Group"), this, SLOT(slotCreateGroup()));
     setupWidget(info, metaInfo);
     setAcceptDrops(true);
@@ -172,14 +175,16 @@ CollapsibleEffect::CollapsibleEffect(QDomElement effect, QDomElement original_ef
     
     if (m_effect.attribute("disable") == "1") {
         title->setEnabled(false);
-       enabledBox->setChecked(false);
+       enabledButton->setChecked(true);
+       enabledButton->setIcon(KIcon("novisible"));
     }
     else {
-        enabledBox->setChecked(true);
+        enabledButton->setChecked(false);
+       enabledButton->setIcon(KIcon("visible"));
     }
 
     connect(collapseButton, SIGNAL(clicked()), this, SLOT(slotSwitch()));
-    connect(enabledBox, SIGNAL(toggled(bool)), this, SLOT(slotEnable(bool)));
+    connect(enabledButton, SIGNAL(toggled(bool)), this, SLOT(slotEnable(bool)));
     connect(buttonUp, SIGNAL(clicked()), this, SLOT(slotEffectUp()));
     connect(buttonDown, SIGNAL(clicked()), this, SLOT(slotEffectDown()));
     connect(buttonDel, SIGNAL(clicked()), this, SLOT(slotDeleteEffect()));
@@ -208,44 +213,40 @@ CollapsibleEffect::~CollapsibleEffect()
 const QString CollapsibleEffect::getStyleSheet()
 {
     KColorScheme scheme(QApplication::palette().currentColorGroup(), KColorScheme::View, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
-    QColor dark_bg = scheme.shade(KColorScheme::DarkShade);
     QColor selected_bg = scheme.decoration(KColorScheme::FocusColor).color();
+    QColor hgh = KColorUtils::mix(QApplication::palette().window().color(), selected_bg, 0.2);
     QColor hover_bg = scheme.decoration(KColorScheme::HoverColor).color();
     QColor light_bg = scheme.shade(KColorScheme::LightShade);
-    //QColor midlight_bg = scheme.shade(KColorScheme::MidlightShade);
-    QColor normal_bg = scheme.background(KColorScheme::AlternateBackground).color();
     QColor alt_bg = scheme.background(KColorScheme::NormalBackground).color();
     
-    KColorScheme scheme2(QApplication::palette().currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
-    QColor normal_bg2 = scheme2.background(KColorScheme::NormalBackground).color();
-    QColor normal_bg3 = scheme2.background(KColorScheme::AlternateBackground).color();
-    
     QString stylesheet;
     
     // group editable labels
-    stylesheet.append(QString("MyEditableLabel { background-color: transparent;} "));
+    stylesheet.append(QString("MyEditableLabel { background-color: transparent;color: palette(bright-text);} "));
     
     // effect background
-    stylesheet.append(QString("QFrame#decoframe {border-radius:5px;border:0px solid %1;background:%3;}  QFrame:hover#decoframe {background:%4;} QFrame#decoframe[active=\"true\"] {background:%2;} ").arg(dark_bg.name()).arg(alt_bg.name()).arg(normal_bg2.name()).arg(normal_bg.name()));
+    stylesheet.append(QString("QFrame#decoframe {border-top-left-radius:5px;border-top-right-radius:5px;border-bottom:2px solid palette(mid);border-top:1px solid palette(light);} QFrame#decoframe[active=\"true\"] {background: %1;}").arg(hgh.name()));
+
+    // effect in group background
+    stylesheet.append(QString("QFrame#decoframesub {border-top:1px solid palette(light);}  QFrame#decoframesub[active=\"true\"] {background: %1;}").arg(hgh.name()));
     
-    // effect group background
-    stylesheet.append(QString("QFrame#decoframegroup {border-radius:5px;border:1px solid %1;background:%2;} QFrame#decoframegroup[active=\"true\"] {background:%3;} ").arg(dark_bg.name()).arg(normal_bg2.name()).arg(alt_bg.name()));
+    // group background
+    stylesheet.append(QString("QFrame#decoframegroup {border-top-left-radius:5px;border-top-right-radius:5px;border:2px solid palette(dark);margin:0px;margin-top:2px;} "));
     
     // effect title bar
-    stylesheet.append(QString("QFrame#frame {border-radius: 5px;} QFrame#frame[active=\"true\"] {background:%1;}").arg(selected_bg.name()));
-    
+    stylesheet.append(QString("QFrame#frame {margin-bottom:2px;border-top-left-radius:5px;border-top-right-radius:5px;}  QFrame#frame[target=\"true\"] {background: palette(highlight);}"));
+
     // group effect title bar
-    stylesheet.append(QString("QFrame#framegroup {border-radius: 5px; background: %2;}  QFrame#framegroup[active=\"true\"] {background:%1;} ").arg(selected_bg.name()).arg(normal_bg3.name()));
-    
-    // draggable effect content bar
-    stylesheet.append(QString("QProgressBar::chunk:horizontal {background: %1;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal#dragOnly {background: %2;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal:hover {background: %3;}").arg(normal_bg2.name()).arg(alt_bg.name()).arg(selected_bg.name()));
+    stylesheet.append(QString("QFrame#framegroup {border-top-left-radius:2px;border-top-right-radius:2px;background: palette(dark);}  QFrame#framegroup[target=\"true\"] {background: palette(highlight);} "));
     
-    // draggable effect content bar
-    stylesheet.append(QString("QProgressBar:horizontal {border: 1px solid %1;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right:0px;background:%4;padding: 0px;text-align:left center} QProgressBar:horizontal:disabled {border: 1px solid %5} QProgressBar:horizontal#dragOnly {background: %4} QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %3;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}").arg(dark_bg.name()).arg(hover_bg.name()).arg(light_bg.name()).arg(alt_bg.name()).arg(normal_bg2.name()));
+    // draggable effect bar content
+    stylesheet.append(QString("QProgressBar::chunk:horizontal {background: palette(button);border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal#dragOnly {background: %1;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal:hover {background: %2;}").arg(alt_bg.name()).arg(selected_bg.name()));
     
+    // draggable effect bar
+    stylesheet.append(QString("QProgressBar:horizontal {border: 1px solid palette(dark);border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right:0px;background:%3;padding: 0px;text-align:left center} QProgressBar:horizontal:disabled {border: 1px solid palette(button)} QProgressBar:horizontal#dragOnly {background: %3} QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %1;border-right: 0px;background: %2;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %1;}").arg(hover_bg.name()).arg(light_bg.name()).arg(alt_bg.name()));
     
     // spin box for draggable widget
-    stylesheet.append(QString("QAbstractSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox:disabled#dragBox {border: 1px solid %4;} QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QAbstractSpinBox:hover#dragBox {border: 1px solid %3;} ").arg(dark_bg.name()).arg(hover_bg.name()).arg(selected_bg.name()).arg(normal_bg2.name()));
+    stylesheet.append(QString("QAbstractSpinBox#dragBox {border: 1px solid palette(dark);border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QAbstractSpinBox::down-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox:disabled#dragBox {border: 1px solid palette(button);} QAbstractSpinBox::up-button#dragBox {width:0px;padding:0px;} QAbstractSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %1;} QAbstractSpinBox:hover#dragBox {border: 1px solid %2;} ").arg(hover_bg.name()).arg(selected_bg.name()));
 
     return stylesheet;
 }
@@ -262,6 +263,11 @@ void CollapsibleEffect::slotUnGroup()
 
 bool CollapsibleEffect::eventFilter( QObject * o, QEvent * e ) 
 {
+    if (e->type() == QEvent::Enter) {
+       frame->setProperty("mouseover", true);
+       frame->setStyleSheet(frame->styleSheet());
+       return QWidget::eventFilter(o, e);
+    }
     if (e->type() == QEvent::Wheel) {
        QWheelEvent *we = static_cast<QWheelEvent *>(e);
        if (!filterWheelEvent || we->modifiers() != Qt::NoModifier) {
@@ -326,29 +332,31 @@ void CollapsibleEffect::setActive(bool activate)
 
 void CollapsibleEffect::mouseDoubleClickEvent ( QMouseEvent * event )
 {
-    if (frame->underMouse() && collapseButton->isEnabled()) slotSwitch();
-    QWidget::mouseDoubleClickEvent(event);
+    if (frame->underMouse() && collapseButton->isEnabled()) {
+       event->accept();
+       slotSwitch();
+    }
+    else event->ignore();
 }
 
-void CollapsibleEffect::mousePressEvent ( QMouseEvent *event )
+void CollapsibleEffect::mouseReleaseEvent( QMouseEvent *event )
 {
-  
-    if (!decoframe->property("active").toBool() && !isGroup()) emit activateEffect(effectIndex());
-    QWidget::mousePressEvent(event);
+  if (!decoframe->property("active").toBool()) emit activateEffect(effectIndex());
+  QWidget::mouseReleaseEvent(event);
 }
 
-
-void CollapsibleEffect::slotEnable(bool enable)
+void CollapsibleEffect::slotEnable(bool disable)
 {
-    title->setEnabled(enable);
-    enabledBox->blockSignals(true);
-    enabledBox->setChecked(enable);
-    enabledBox->blockSignals(false);
-    m_effect.setAttribute("disable", enable ? 0 : 1);
-    if (enable || KdenliveSettings::disable_effect_parameters()) {
-       widgetFrame->setEnabled(enable);
+    title->setEnabled(!disable);
+    enabledButton->blockSignals(true);
+    enabledButton->setChecked(disable);
+    enabledButton->blockSignals(false);
+    enabledButton->setIcon(disable ? KIcon("novisible") : KIcon("visible"));
+    m_effect.setAttribute("disable", disable ? 1 : 0);
+    if (disable || KdenliveSettings::disable_effect_parameters()) {
+       widgetFrame->setEnabled(!disable);
     }
-    emit effectStateChanged(!enable, effectIndex());
+    emit effectStateChanged(disable, effectIndex());
 }
 
 void CollapsibleEffect::slotDeleteEffect()
@@ -480,7 +488,7 @@ void CollapsibleEffect::setupWidget(ItemInfo info, EffectMetaInfo *metaInfo)
 
     if (m_effect.attribute("tag") == "region") {
         QVBoxLayout *vbox = new QVBoxLayout(widgetFrame);
-        vbox->setContentsMargins(2, 0, 2, 0);
+        vbox->setContentsMargins(0, 0, 0, 0);
        vbox->setSpacing(2);
         QDomNodeList effects =  m_effect.elementsByTagName("effect");
        QDomNodeList origin_effects =  m_original_effect.elementsByTagName("effect");
@@ -545,7 +553,7 @@ void CollapsibleEffect::slotSyncEffectsPos(int pos)
 void CollapsibleEffect::dragEnterEvent(QDragEnterEvent *event)
 {
     if (event->mimeData()->hasFormat("kdenlive/effectslist")) {
-       frame->setProperty("active", true);
+       frame->setProperty("target", true);
        frame->setStyleSheet(frame->styleSheet());
        event->acceptProposedAction();
     }
@@ -553,13 +561,13 @@ void CollapsibleEffect::dragEnterEvent(QDragEnterEvent *event)
 
 void CollapsibleEffect::dragLeaveEvent(QDragLeaveEvent */*event*/)
 {
-    frame->setProperty("active", false);
+    frame->setProperty("target", false);
     frame->setStyleSheet(frame->styleSheet());
 }
 
 void CollapsibleEffect::dropEvent(QDropEvent *event)
 {
-    frame->setProperty("active", false);
+    frame->setProperty("target", false);
     frame->setStyleSheet(frame->styleSheet());
     const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
     //event->acceptProposedAction();
@@ -607,7 +615,7 @@ ParameterContainer::ParameterContainer(QDomElement effect, ItemInfo info, Effect
 
     bool stretch = true;
     m_vbox = new QVBoxLayout(parent);
-    m_vbox->setContentsMargins(2, 0, 2, 0);
+    m_vbox->setContentsMargins(4, 0, 4, 0);
     m_vbox->setSpacing(2);
 
     for (int i = 0; i < namenode.count() ; i++) {
@@ -1216,8 +1224,9 @@ void ParameterContainer::slotCollectAllParameters()
             QString val = m_keyframeEditor->getValue(realName);
             elem.setAttribute("keyframes", val);
 
-            if (m_keyframeEditor->isVisibleParam(realName))
+            if (m_keyframeEditor->isVisibleParam(realName)) {
                 elem.setAttribute("intimeline", "1");
+           }
             else if (elem.hasAttribute("intimeline"))
                 elem.removeAttribute("intimeline");
         } else if (type == "url") {
index 30ab1547d21b4e1d75504cbdea0d0ff98c071b4f..6b12a873dcf015b444907a785a338359477d3d25 100644 (file)
@@ -177,7 +177,7 @@ private:
     
 protected:
     virtual void mouseDoubleClickEvent ( QMouseEvent * event );
-    virtual void mousePressEvent ( QMouseEvent * event );
+    virtual void mouseReleaseEvent( QMouseEvent *event );
     virtual void dragEnterEvent(QDragEnterEvent *event);
     virtual void dragLeaveEvent(QDragLeaveEvent *event);
     virtual void dropEvent(QDropEvent *event);
index 3c43a678f9578abc17ba9fedde739625bda1f09b..d46e20f9a6333ea04942bac6dc0efa097397db72 100644 (file)
@@ -62,7 +62,7 @@ CollapsibleGroup::CollapsibleGroup(int ix, bool firstGroup, bool lastGroup, QStr
     setFont(KGlobalSettings::smallestReadableFont());
     QHBoxLayout *l = static_cast <QHBoxLayout *>(framegroup->layout());
     m_title = new MyEditableLabel(this);
-    l->insertWidget(4, m_title);
+    l->insertWidget(3, m_title);
     m_title->setText(groupName.isEmpty() ? i18n("Effect Group") : groupName);
     connect(m_title, SIGNAL(editingFinished()), this, SLOT(slotRenameGroup()));
     buttonUp->setIcon(KIcon("kdenlive-up"));
@@ -78,16 +78,16 @@ CollapsibleGroup::CollapsibleGroup(int ix, bool firstGroup, bool lastGroup, QStr
     m_menu->addAction(KIcon("view-refresh"), i18n("Reset Group"), this, SLOT(slotResetGroup()));
     m_menu->addAction(KIcon("document-save"), i18n("Save Group"), this, SLOT(slotSaveGroup()));
     
-    effecticon->setPixmap(KIcon("folder").pixmap(16,16));
     m_menu->addAction(KIcon("list-remove"), i18n("Ungroup"), this, SLOT(slotUnGroup()));
     setAcceptDrops(true);
     menuButton->setIcon(KIcon("kdenlive-menu"));
     menuButton->setMenu(m_menu);
     
-    enabledBox->setChecked(true);
+    enabledButton->setChecked(false);
+    enabledButton->setIcon(KIcon("visible"));
 
     connect(collapseButton, SIGNAL(clicked()), this, SLOT(slotSwitch()));
-    connect(enabledBox, SIGNAL(toggled(bool)), this, SLOT(slotEnable(bool)));
+    connect(enabledButton, SIGNAL(toggled(bool)), this, SLOT(slotEnable(bool)));
     connect(buttonUp, SIGNAL(clicked()), this, SLOT(slotEffectUp()));
     connect(buttonDown, SIGNAL(clicked()), this, SLOT(slotEffectDown()));
     connect(buttonDel, SIGNAL(clicked()), this, SLOT(slotDeleteGroup()));
@@ -122,18 +122,15 @@ void CollapsibleGroup::mouseDoubleClickEvent ( QMouseEvent * event )
 }
 
 
-void CollapsibleGroup::slotEnable(bool enable)
+void CollapsibleGroup::slotEnable(bool disable)
 {
-    m_title->setEnabled(enable);
-    enabledBox->blockSignals(true);
-    enabledBox->setChecked(enable);
-    enabledBox->blockSignals(false);
-    QVBoxLayout *vbox = static_cast<QVBoxLayout *>(widgetFrame->layout());
-    if (vbox == NULL) return;
-    for (int i = 0; i < vbox->count(); i++) {
-       CollapsibleGroup *e = static_cast<CollapsibleGroup *>(vbox->itemAt(i)->widget());
-       if (e) e->enabledBox->setChecked(enable);// slotEnable(enable);
-    }
+    m_title->setEnabled(!disable);
+    enabledButton->blockSignals(true);
+    enabledButton->setChecked(disable);
+    enabledButton->setIcon(disable ? KIcon("novisible") : KIcon("visible"));
+    enabledButton->blockSignals(false);
+    for (int i = 0; i < m_subWidgets.count(); i++)
+       m_subWidgets.at(i)->slotEnable(disable);
 }
 
 void CollapsibleGroup::slotDeleteGroup()
@@ -234,6 +231,7 @@ void CollapsibleGroup::addGroupEffect(CollapsibleEffect *effect)
     }
     effect->setGroupIndex(groupIndex());
     effect->setGroupName(m_title->text());
+    effect->decoframe->setObjectName("decoframesub");
     m_subWidgets.append(effect);
     vbox->addWidget(effect);
 }
@@ -251,6 +249,7 @@ void CollapsibleGroup::removeGroup(int ix, QVBoxLayout *layout)
     for (int i = m_subWidgets.count() - 1; i >= 0 ; i--) {
        vbox->removeWidget(m_subWidgets.at(i));
        layout->insertWidget(ix, m_subWidgets.at(i));
+       m_subWidgets.at(i)->decoframe->setObjectName("decoframe");
         m_subWidgets.at(i)->removeFromGroup();
     }
     m_subWidgets.clear();
@@ -279,7 +278,7 @@ void CollapsibleGroup::updateTimecodeFormat()
 void CollapsibleGroup::dragEnterEvent(QDragEnterEvent *event)
 {
     if (event->mimeData()->hasFormat("kdenlive/effectslist")) {
-       framegroup->setProperty("active", true);
+       framegroup->setProperty("target", true);
        framegroup->setStyleSheet(framegroup->styleSheet());
        event->acceptProposedAction();
     }
@@ -287,13 +286,13 @@ void CollapsibleGroup::dragEnterEvent(QDragEnterEvent *event)
 
 void CollapsibleGroup::dragLeaveEvent(QDragLeaveEvent */*event*/)
 {
-    framegroup->setProperty("active", false);
+    framegroup->setProperty("target", false);
     framegroup->setStyleSheet(framegroup->styleSheet());
 }
 
 void CollapsibleGroup::dropEvent(QDropEvent *event)
 {
-    framegroup->setProperty("active", false);
+    framegroup->setProperty("target", false);
     framegroup->setStyleSheet(framegroup->styleSheet());
     const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
     //event->acceptProposedAction();
index dabad6e0426f9a9dbe970bdced045c70ffff50d2..8d64110e61fb409b7ca0f7051d87c6d53a57adcf 100644 (file)
@@ -445,7 +445,7 @@ void EffectStackView2::slotUpdateCheckAllButton()
     bool hasDisabled = false;
     
     for (int i = 0; i < m_effects.count(); i++) {
-       if (m_effects.at(i)->enabledBox->isChecked()) hasEnabled = true;
+       if (!m_effects.at(i)->enabledButton->isChecked()) hasEnabled = true;
        else hasDisabled = true; 
     }
 
@@ -505,15 +505,16 @@ void EffectStackView2::slotUpdateEffectParams(const QDomElement old, const QDomE
 
 void EffectStackView2::slotSetCurrentEffect(int ix)
 {
-    if (m_clipref && ix != m_clipref->selectedEffectIndex())
+    if (m_clipref && ix != m_clipref->selectedEffectIndex()) {
         m_clipref->setSelectedEffect(ix);
-    for (int i = 0; i < m_effects.count(); i++) {
-       if (m_effects.at(i)->effectIndex() == ix) {
-           m_effects.at(i)->setActive(true);
-           m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
-            m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
+       for (int i = 0; i < m_effects.count(); i++) {
+           if (m_effects.at(i)->effectIndex() == ix) {
+               m_effects.at(i)->setActive(true);
+               m_ui.labelComment->setText(i18n(m_effects.at(i)->effect().firstChildElement("description").firstChildElement("full").text().toUtf8().data()));
+               m_ui.labelComment->setHidden(!m_ui.buttonShowComments->isChecked() || m_ui.labelComment->text().isEmpty());
+           }
+           else m_effects.at(i)->setActive(false);
        }
-        else m_effects.at(i)->setActive(false);
     }
 }
 
index 16519b5533c66bc7e42db7071de3cd01b977c234..5c97c3dd599ecb7ca812d7d7565be9ea0b2ad5fb 100644 (file)
           </widget>
          </item>
          <item>
-          <widget class="KSeparator" name="kseparator">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
+          <widget class="QToolButton" name="enabledButton">
+           <property name="maximumSize">
+            <size>
+             <width>22</width>
+             <height>22</height>
+            </size>
            </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QCheckBox" name="enabledBox">
            <property name="text">
-            <string/>
+            <string>...</string>
            </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QLabel" name="effecticon">
-           <property name="text">
-            <string/>
+           <property name="checkable">
+            <bool>true</bool>
+           </property>
+           <property name="autoRaise">
+            <bool>true</bool>
            </property>
           </widget>
          </item>
    </item>
   </layout>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>KSeparator</class>
-   <extends>QFrame</extends>
-   <header>kseparator.h</header>
-  </customwidget>
- </customwidgets>
  <resources/>
  <connections/>
 </ui>
index 658d0b5cfd77b90434b49c45be7e74b615706009..0bcceb8e9eabb7c4021ca4ba1d3cf2a7a923c246 100644 (file)
           </widget>
          </item>
          <item>
-          <widget class="KSeparator" name="kseparator">
-           <property name="orientation">
-            <enum>Qt::Vertical</enum>
+          <widget class="QToolButton" name="enabledButton">
+           <property name="maximumSize">
+            <size>
+             <width>22</width>
+             <height>22</height>
+            </size>
            </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QCheckBox" name="enabledBox">
            <property name="text">
-            <string/>
+            <string>...</string>
            </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QLabel" name="effecticon">
-           <property name="text">
-            <string/>
+           <property name="checkable">
+            <bool>true</bool>
+           </property>
+           <property name="autoRaise">
+            <bool>true</bool>
            </property>
           </widget>
          </item>
    </item>
   </layout>
  </widget>
- <customwidgets>
-  <customwidget>
-   <class>KSeparator</class>
-   <extends>QFrame</extends>
-   <header>kseparator.h</header>
-  </customwidget>
- </customwidgets>
  <resources/>
  <connections/>
 </ui>
index 122925d4b43307db3c5797d7805affa495a3e42f..c7fea5296c627980d4242737d833b6223cb8a6f9 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>343</width>
-    <height>178</height>
+    <width>267</width>
+    <height>157</height>
    </rect>
   </property>
   <layout class="QGridLayout" name="gridLayout">
    <property name="rightMargin">
     <number>0</number>
    </property>
-   <item row="4" column="0" colspan="3">
+   <item row="3" column="0" colspan="2">
     <widget class="Line" name="line">
      <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
     </widget>
    </item>
-   <item row="3" column="0" colspan="3">
+   <item row="2" column="0" colspan="2">
     <widget class="QFrame" name="param_sliders">
      <property name="frameShape">
       <enum>QFrame::NoFrame</enum>
      </property>
     </widget>
    </item>
-   <item row="2" column="0" colspan="3">
+   <item row="1" column="0" colspan="2">
     <widget class="QWidget" name="widgetTable" native="true">
      <layout class="QGridLayout" name="gridLayout_2">
       <property name="margin">
      </layout>
     </widget>
    </item>
-   <item row="0" column="0" colspan="3">
-    <widget class="Line" name="line_2">
-     <property name="orientation">
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="1" column="0">
+   <item row="0" column="0">
     <widget class="QToolButton" name="buttonKeyframes">
      <property name="toolTip">
       <string>Add keyframes</string>