#include <KDebug>
#include <KLocale>
#include <KFileDialog>
+#include <KColorScheme>
#include <QVBoxLayout>
#include <QLabel>
setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
setFrameStyle(QFrame::NoFrame);
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding));
-
+
+ QPalette p = 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 mid_bg = scheme.shade(KColorScheme::DarkShade);
+
+ QString stylesheet(QString("QProgressBar:horizontal {border: 1px solid %5;border-radius:0px;border-top-left-radius: 4px;border-bottom-left-radius: 4px;border-right: 0px;background:%4;padding: 0px;text-align:left center} QProgressBar:horizontal#dragOnly {background: %5} QProgressBar:horizontal:hover#dragOnly {background: %3} QProgressBar:horizontal:hover {border: 1px solid %3;border-right: 0px;} QProgressBar::chunk:horizontal {background: %5;} QProgressBar::chunk:horizontal:hover {background: %3;} 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;} QSpinBox#dragBox {border: 1px solid %1;border-top-right-radius: 4px;border-bottom-right-radius: 4px;padding-right:0px;} QSpinBox::down-button#dragBox {width:0px;padding:0px;} QSpinBox::up-button#dragBox {width:0px;padding:0px;} QSpinBox[inTimeline=\"true\"]#dragBox { border: 1px solid %2;} QSpinBox:hover#dragBox {border: 1px solid %3;} ").arg(dark_bg.name()).arg(selected_bg.name()).arg(hover_bg.name()).arg(light_bg.name()).arg(mid_bg.name()));
+ setStyleSheet(stylesheet);
+
setWidget(m_baseWidget);
setWidgetResizable(true);
m_vbox = new QVBoxLayout(m_baseWidget);
m_vbox->setContentsMargins(0, 0, 0, 0);
- m_vbox->setSpacing(0);
- //wid->show();
+ m_vbox->setSpacing(2);
}
EffectStackEdit::~EffectStackEdit()
QString type = pa.attributes().namedItem("type").nodeValue();
QString paramName = i18n(na.toElement().text().toUtf8().data());
- if (type == "geometry" && !KdenliveSettings::on_monitor_effects()) {
- Geometryval *geom = ((Geometryval*)m_valueItems[paramName+"geometry"]);
- geom->setFrameSize(m_frameSize);
- break;
+ if (type == "geometry") {
+ if (!KdenliveSettings::on_monitor_effects()) {
+ Geometryval *geom = ((Geometryval*)m_valueItems[paramName+"geometry"]);
+ geom->setFrameSize(m_frameSize);
+ break;
+ }
+ else {
+ GeometryWidget *geom = ((GeometryWidget*)m_valueItems[paramName+"geometry"]);
+ geom->setFrameSize(m_frameSize);
+ break;
+ }
}
}
}
max = pa.attribute("max").toInt();
DoubleParameterWidget *doubleparam = new DoubleParameterWidget(paramName, (int)(value.toDouble() + 0.5), min, max,
- pa.attribute("default").toInt(), comment, pa.attribute("suffix"), this);
+ pa.attribute("default").toInt(), comment, -1, pa.attribute("suffix"), this);
m_vbox->addWidget(doubleparam);
m_valueItems[paramName] = doubleparam;
connect(doubleparam, SIGNAL(valueChanged(int)), this, SLOT(collectAllParameters()));
} else if (type == "geometry") {
if (KdenliveSettings::on_monitor_effects()) {
GeometryWidget *geometry = new GeometryWidget(m_monitor, m_timecode, pos, isEffect, this);
+ geometry->setFrameSize(m_frameSize);
geometry->slotShowScene(!disable);
// connect this before setupParam to make sure the monitor scene shows up at startup
connect(geometry, SIGNAL(checkMonitorPosition(int)), this, SIGNAL(checkMonitorPosition(int)));
if (m_keyframeEditor)
m_keyframeEditor->checkVisibleParam();
+
+ // Make sure all doubleparam spinboxes have the same width, looks much better
+ QList<DoubleParameterWidget *> allWidgets = findChildren<DoubleParameterWidget *>();
+ int minSize = 0;
+ for (int i = 0; i < allWidgets.count(); i++) {
+ if (minSize < allWidgets.at(i)->spinSize()) minSize = allWidgets.at(i)->spinSize();
+ }
+ for (int i = 0; i < allWidgets.count(); i++) {
+ allWidgets.at(i)->setSpinSize(minSize);
+ }
}
wipeInfo EffectStackEdit::getWipeInfo(QString value)