mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Allow slowing down Animations::Simple in debug build.
This commit is contained in:
parent
e032dbf383
commit
db453ab7ae
1 changed files with 11 additions and 2 deletions
|
@ -630,11 +630,20 @@ bool MainWindow::eventFilter(QObject *object, QEvent *e) {
|
|||
switch (e->type()) {
|
||||
case QEvent::KeyPress: {
|
||||
if (Logs::DebugEnabled()
|
||||
&& (e->type() == QEvent::KeyPress)
|
||||
&& object == windowHandle()) {
|
||||
auto key = static_cast<QKeyEvent*>(e)->key();
|
||||
const auto key = static_cast<QKeyEvent*>(e)->key();
|
||||
FeedLangTestingKey(key);
|
||||
}
|
||||
#ifdef _DEBUG
|
||||
switch (static_cast<QKeyEvent*>(e)->key()) {
|
||||
case Qt::Key_F3:
|
||||
anim::SetSlowMultiplier((anim::SlowMultiplier() == 10) ? 1 : 10);
|
||||
return true;
|
||||
case Qt::Key_F4:
|
||||
anim::SetSlowMultiplier((anim::SlowMultiplier() == 50) ? 1 : 50);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
} break;
|
||||
|
||||
case QEvent::MouseMove: {
|
||||
|
|
Loading…
Add table
Reference in a new issue