mirror of
https://github.com/YACReader/yacreader
synced 2026-01-31 04:10:04 -05:00
Add quick navigation mode
This commit is contained in:
@ -6,20 +6,17 @@
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include "goto_flow_toolbar.h"
|
||||
#include "configuration.h"
|
||||
|
||||
GoToFlowWidget::GoToFlowWidget(QWidget * parent)
|
||||
:QWidget(parent)
|
||||
{
|
||||
mainLayout = new QVBoxLayout;
|
||||
|
||||
mainLayout->setMargin(0);
|
||||
mainLayout->setSpacing(0);
|
||||
|
||||
toolBar = new GoToFlowToolBar(this);
|
||||
|
||||
mainLayout->setMargin(0);
|
||||
mainLayout->setSpacing(0);
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
//toolBar->installEventFilter(this);
|
||||
@ -54,6 +51,15 @@ void GoToFlowWidget::keyPressEvent(QKeyEvent* event)
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void GoToFlowWidget::updateSize()
|
||||
{
|
||||
// called by parent in resizeEvent
|
||||
// no need to update width when QuickNaviMode disabled
|
||||
// height is set in updateConfig
|
||||
if (Configuration::getConfiguration().getQuickNaviMode() && parentWidget() != nullptr)
|
||||
resize(parentWidget()->width(),height());
|
||||
}
|
||||
|
||||
/*bool GoToFlowWidget::eventFilter(QObject * target, QEvent * event)
|
||||
{
|
||||
if(event->type() == QEvent::KeyPress)
|
||||
|
||||
Reference in New Issue
Block a user