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

Add zoom buttons to bin menu to make zoom more usable

parent 25f26f5c
......@@ -657,14 +657,30 @@ Bin::Bin(const std::shared_ptr<ProjectItemModel> &model, QWidget *parent)
connect(this, &Bin::refreshPanel, this, &Bin::doRefreshPanel);
// Zoom slider
QWidget *container = new QWidget(this);
QHBoxLayout *lay = new QHBoxLayout;
m_slider = new QSlider(Qt::Horizontal, this);
m_slider->setMaximumWidth(100);
m_slider->setMinimumWidth(40);
m_slider->setRange(0, 10);
m_slider->setValue(KdenliveSettings::bin_zoom());
connect(m_slider, &QAbstractSlider::valueChanged, this, &Bin::slotSetIconSize);
QToolButton *tb1 = new QToolButton(this);
tb1->setIcon(QIcon::fromTheme(QStringLiteral("zoom-in")));
connect(tb1, &QToolButton::clicked, [&] () {
m_slider->setValue(qMin(m_slider->value() + 1, m_slider->maximum()));
});
QToolButton *tb2 = new QToolButton(this);
tb2->setIcon(QIcon::fromTheme(QStringLiteral("zoom-out")));
connect(tb2, &QToolButton::clicked, [&] () {
m_slider->setValue(qMax(m_slider->value() - 1, m_slider->minimum()));
});
lay->addWidget(tb1);
lay->addWidget(m_slider);
lay->addWidget(tb2);
container->setLayout(lay);
auto *widgetslider = new QWidgetAction(this);
widgetslider->setDefaultWidget(m_slider);
widgetslider->setDefaultWidget(container);
// View type
KSelectAction *listType = new KSelectAction(QIcon::fromTheme(QStringLiteral("view-list-tree")), i18n("View Mode"), this);
......
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