--Code changes

-Upgrade to Qt 5.11.2
This commit is contained in:
Person 2018-09-29 13:28:03 -07:00
parent 0a27382c8a
commit 2d27eecd5e
3 changed files with 60 additions and 12 deletions

View File

@ -214,16 +214,37 @@ bool DoubleSpinBox::eventFilter(QObject* o, QEvent* e)
{
if (e->type() == QEvent::Wheel)
{
//Take special action for shift to reduce the scroll amount. Control already
//increases it automatically.
if (QWheelEvent* we = dynamic_cast<QWheelEvent*>(e))
{
Qt::KeyboardModifiers mod = we->modifiers();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
if (mod.testFlag(Qt::ShiftModifier))
setSingleStep(m_SmallStep);
if (we->angleDelta().ry() > 0)
{
if (shift)
{
setSingleStep(m_SmallStep);
setValue(value() + m_SmallStep);
}
else
{
setSingleStep(m_Step);
setValue(value() + (ctrl ? m_Step * 10 : m_Step));
}
}
else
setSingleStep(m_Step);
{
if (shift)
{
setSingleStep(m_SmallStep);
setValue(value() - m_SmallStep);
}
else
{
setSingleStep(m_Step);
setValue(value() - (ctrl ? m_Step * 10 : m_Step));
}
}
}
}
}

View File

@ -210,16 +210,37 @@ bool SpinBox::eventFilter(QObject* o, QEvent* e)
{
if (e->type() == QEvent::Wheel)
{
//Take special action for shift to reduce the scroll amount. Control already
//increases it automatically.
if (QWheelEvent* we = dynamic_cast<QWheelEvent*>(e))
{
Qt::KeyboardModifiers mod = we->modifiers();
bool shift = QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier);
bool ctrl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
if (mod.testFlag(Qt::ShiftModifier))
setSingleStep(m_SmallStep);
if (we->angleDelta().ry() > 0)
{
if (shift)
{
setSingleStep(m_SmallStep);
setValue(value() + m_SmallStep);
}
else
{
setSingleStep(m_Step);
setValue(value() + (ctrl ? m_Step * 10 : m_Step));
}
}
else
setSingleStep(m_Step);
{
if (shift)
{
setSingleStep(m_SmallStep);
setValue(value() - m_SmallStep);
}
else
{
setSingleStep(m_Step);
setValue(value() - (ctrl ? m_Step * 10 : m_Step));
}
}
}
}
}

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
fractorium (1.0.0.11d-0ubuntu1) cosmic; urgency=low
* release 1.0.0.11
-- Matt Feemster <matt.feemster@gmail.com> Sat, 29 Sep 2018 13:26:38 -0700
fractorium (1.0.0.11c-0ubuntu1) cosmic; urgency=low
* release 1.0.0.11