QColor selected_bg = scheme.decoration(KColorScheme::FocusColor).color();
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(p.currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
QColor normal_bg2 = scheme2.background(KColorScheme::NormalBackground).color();
-
- QString stylesheet(QString("MyEditableLabel { background-color: transparent;} QFrame#decoframe {border-radius:5px;border:0px solid %1;background:%6;} QFrame#decoframegroup {border-radius:5px;border:1px solid %1;background:%6;} QFrame:hover#decoframe {background:%7;} QFrame#decoframe[active=\"true\"] {background:%5;} QFrame#decoframegroup[active=\"true\"] {background:%5;} QFrame#frame[active=\"true\"] {background:%3;} QProgressBar::chunk:horizontal {background: %6;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal#dragOnly {background: %5;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal:hover {background: %3;}\
- QProgressBar:horizontal {border: 1px solid %1;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right:0px;background:%5;padding: 0px;text-align:left center}\
- QProgressBar:horizontal:disabled {border: 1px solid %6} QProgressBar:horizontal#dragOnly {background: %5}\
- QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\
- 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 %6;}\
- 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(light_bg.name()).arg(alt_bg.name()).arg(normal_bg2.name()).arg(normal_bg.name()));
- return stylesheet;/*
- QPalette p = QApplication::palette();
- KColorScheme scheme(p.currentColorGroup(), KColorScheme::View, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
- QColor dark_bg = scheme.shade(KColorScheme::DarkShade);
- QColor selected_bg = scheme.decoration(KColorScheme::FocusColor).color();
- QColor hover_bg = scheme.decoration(KColorScheme::HoverColor).color();
- QColor light_bg = scheme.shade(KColorScheme::LightShade);
- QColor normal_bg = scheme.background(KColorScheme::NormalBackground).color();
+ QColor normal_bg3 = scheme2.background(KColorScheme::AlternateBackground).color();
- KColorScheme scheme2(p.currentColorGroup(), KColorScheme::Window, KSharedConfig::openConfig(KdenliveSettings::colortheme()));
- QColor normal_bg2 = scheme2.background(KColorScheme::NormalBackground).color();
+ QString stylesheet;
+
+ // group editable labels
+ stylesheet.append(QString("MyEditableLabel { background-color: transparent;} "));
+
+ // 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()));
+
+ // 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()));
+
+ // effect title bar
+ stylesheet.append(QString("QFrame#frame {border-radius: 5px;} QFrame#frame[active=\"true\"] {background:%1;}").arg(selected_bg.name()));
+
+ // 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()));
+
+ // 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()));
+
+
+ // 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()));
- QString stylesheet(QString("QProgressBar::chunk:horizontal {background: %6;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal#dragOnly {background: %5;border-top-left-radius: 4px;border-bottom-left-radius: 4px;} QProgressBar::chunk:horizontal:hover {background: %3;}\
- QProgressBar:horizontal {border: 1px solid %1;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right:0px;background:%5;padding: 0px;text-align:left center}\
- QProgressBar:horizontal:disabled {border: 1px solid %6} QProgressBar:horizontal#dragOnly {background: %5}\
- QProgressBar:horizontal[inTimeline=\"true\"] { border: 1px solid %2;border-right: 0px;background: %4;padding: 0px;text-align:left center } QProgressBar::chunk:horizontal[inTimeline=\"true\"] {background: %2;}\
- 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 %6;}\
- 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(light_bg.name()).arg(normal_bg.name()).arg(normal_bg2.name()));
- return stylesheet;*/
+ return stylesheet;
}
void CollapsibleEffect::slotCreateGroup()
{
setupUi(this);
setFont(KGlobalSettings::smallestReadableFont());
- QHBoxLayout *l = static_cast <QHBoxLayout *>(frame->layout());
+ QHBoxLayout *l = static_cast <QHBoxLayout *>(framegroup->layout());
m_title = new MyEditableLabel(this);
l->insertWidget(4, m_title);
m_title->setText(groupName.isEmpty() ? i18n("Effect Group") : groupName);
void CollapsibleGroup::mouseDoubleClickEvent ( QMouseEvent * event )
{
- if (frame->underMouse() && collapseButton->isEnabled()) slotSwitch();
+ if (framegroup->underMouse() && collapseButton->isEnabled()) slotSwitch();
QWidget::mouseDoubleClickEvent(event);
}
QVBoxLayout *vbox = static_cast<QVBoxLayout *>(widgetFrame->layout());
if (vbox == NULL) {
vbox = new QVBoxLayout();
- vbox->setContentsMargins(10, 0, 0, 0);
+ vbox->setContentsMargins(0, 0, 0, 0);
vbox->setSpacing(2);
widgetFrame->setLayout(vbox);
}
void CollapsibleGroup::dragEnterEvent(QDragEnterEvent *event)
{
if (event->mimeData()->hasFormat("kdenlive/effectslist")) {
- frame->setProperty("active", true);
- frame->setStyleSheet(frame->styleSheet());
+ framegroup->setProperty("active", true);
+ framegroup->setStyleSheet(framegroup->styleSheet());
event->acceptProposedAction();
}
}
void CollapsibleGroup::dragLeaveEvent(QDragLeaveEvent */*event*/)
{
- frame->setProperty("active", false);
- frame->setStyleSheet(frame->styleSheet());
+ framegroup->setProperty("active", false);
+ framegroup->setStyleSheet(framegroup->styleSheet());
}
void CollapsibleGroup::dropEvent(QDropEvent *event)
{
- frame->setProperty("active", false);
- frame->setStyleSheet(frame->styleSheet());
+ framegroup->setProperty("active", false);
+ framegroup->setStyleSheet(framegroup->styleSheet());
const QString effects = QString::fromUtf8(event->mimeData()->data("kdenlive/effectslist"));
//event->acceptProposedAction();
QDomDocument doc;