Commit 9dab9756 authored by Farid Abdelnour's avatar Farid Abdelnour 🎥

Fixed Zoom buttons now as requested. (Hopefully)

parent 0d44e1d1
Pipeline #716 passed with stage
in 18 minutes and 32 seconds
......@@ -651,16 +651,16 @@ Bin::Bin(const std::shared_ptr<ProjectItemModel> &model, QWidget *parent)
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()));
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()));
m_slider->setValue(qMax(m_slider->value() - 1, m_slider->minimum()));
});
lay->addWidget(tb1);
lay->addWidget(m_slider);
lay->addWidget(tb2);
lay->addWidget(m_slider);
lay->addWidget(tb1);
container->setLayout(lay);
auto *widgetslider = new QWidgetAction(this);
widgetslider->setDefaultWidget(container);
......
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