mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-11 15:29:51 -05:00
Allow horizontal scrolling with Shift+Scroll in EntryView.
This commit is contained in:
parent
740994ed48
commit
8c031605e7
@ -26,6 +26,7 @@
|
||||
#include <QMenu>
|
||||
#include <QPainter>
|
||||
#include <QScreen>
|
||||
#include <QScrollBar>
|
||||
#include <QShortcut>
|
||||
#include <QStyledItemDelegate>
|
||||
#include <QWindow>
|
||||
@ -594,3 +595,12 @@ bool EntryView::isColumnHidden(int logicalIndex)
|
||||
{
|
||||
return header()->isSectionHidden(logicalIndex) || header()->sectionSize(logicalIndex) == 0;
|
||||
}
|
||||
|
||||
void EntryView::wheelEvent(QWheelEvent* event)
|
||||
{
|
||||
if (event->modifiers() & Qt::ShiftModifier) {
|
||||
horizontalScrollBar()->event(event);
|
||||
} else {
|
||||
QAbstractScrollArea::wheelEvent(event);
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ protected:
|
||||
void focusInEvent(QFocusEvent* event) override;
|
||||
void showEvent(QShowEvent* event) override;
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
void wheelEvent(QWheelEvent* event) override;
|
||||
|
||||
private slots:
|
||||
void emitEntryActivated(const QModelIndex& index);
|
||||
|
Loading…
Reference in New Issue
Block a user