Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Ensure effect/composition properties displays scrollbar

parent 668ebd63
......@@ -44,9 +44,10 @@
#include <klocalizedstring.h>
AssetPanel::AssetPanel(QWidget *parent)
: QScrollArea(parent)
: QWidget(parent)
, m_lay(new QVBoxLayout(this))
, m_assetTitle(new KSqueezedTextLabel(this))
, m_container(new QWidget(this))
, m_transitionWidget(new TransitionStackView(this))
, m_effectStackWidget(new EffectStackView(this))
{
......@@ -78,8 +79,20 @@ AssetPanel::AssetPanel(QWidget *parent)
tLayout->addWidget(m_timelineButton);
m_lay->addLayout(tLayout);
m_lay->addWidget(m_transitionWidget);
m_lay->addWidget(m_effectStackWidget);
m_lay->setContentsMargins(0, 0, 0, 0);
QVBoxLayout *lay = new QVBoxLayout(m_container);
lay->setContentsMargins(0, 0, 0, 0);
lay->addWidget(m_transitionWidget);
lay->addWidget(m_effectStackWidget);
QScrollArea *sc = new QScrollArea;
sc->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
sc->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
sc->setFrameStyle(QFrame::NoFrame);
sc->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::MinimumExpanding));
sc->setWidgetResizable(true);
m_lay->addWidget(sc);
sc->setWidget(m_container);
m_transitionWidget->setVisible(false);
m_effectStackWidget->setVisible(false);
updatePalette();
......@@ -93,7 +106,7 @@ void AssetPanel::showTransition(int tid, std::shared_ptr<AssetParameterModel> tr
QString transitionId = transitionModel->getAssetId();
m_transitionWidget->setProperty("compositionId", tid);
QString transitionName = TransitionsRepository::get()->getName(transitionId);
m_assetTitle->setText(i18n("Properties of transition %1", transitionName));
m_assetTitle->setText(i18n("%1 properties", transitionName));
m_transitionWidget->setVisible(true);
m_timelineButton->setVisible(true);
m_transitionWidget->setModel(transitionModel, QPair<int, int>(-1, -1), QSize(), true);
......
......@@ -42,7 +42,7 @@ class EffectStackView;
class TransitionStackView;
class QLabel;
class AssetPanel : public QScrollArea
class AssetPanel : public QWidget
{
Q_OBJECT
......@@ -74,6 +74,7 @@ protected:
static const QString getStyleSheet();
QVBoxLayout *m_lay;
KSqueezedTextLabel *m_assetTitle;
QWidget *m_container;
TransitionStackView *m_transitionWidget;
EffectStackView *m_effectStackWidget;
......
......@@ -136,7 +136,6 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do
connect(m_label, &CustomLabel::setInTimeline, this, &DragValue::slotSetInTimeline);
m_menu->addAction(timeline);
}
connect(this, &QWidget::customContextMenuRequested, this, &DragValue::slotShowContextMenu);
connect(m_scale, SIGNAL(triggered(int)), this, SLOT(slotSetScaleMode(int)));
connect(m_directUpdate, &QAction::triggered, this, &DragValue::slotSetDirectUpdate);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment