mirror of
https://github.com/YACReader/yacreader
synced 2026-01-31 04:10:04 -05:00
updated go to flow visual style
This commit is contained in:
@ -34,7 +34,6 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
||||
|
||||
worker = new PageLoader(&mutexGoToFlow);
|
||||
|
||||
|
||||
flow = new YACReaderFlow(this,flowType);
|
||||
flow->setReflectionEffect(PictureFlow::PlainReflection);
|
||||
imageSize = Configuration::getConfiguration().getGotoSlideSize();
|
||||
@ -46,23 +45,14 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
||||
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
|
||||
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(showSlide(unsigned int)));
|
||||
|
||||
mainLayout->insertWidget(0,flow);
|
||||
mainLayout->setStretchFactor(flow,1);
|
||||
mainLayout->addWidget(flow);
|
||||
toolBar->raise();
|
||||
|
||||
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
|
||||
|
||||
//install eventFilter
|
||||
//flow->installEventFilter(this);
|
||||
/*edit->installEventFilter(this);
|
||||
centerButton->installEventFilter(this);
|
||||
goToButton->installEventFilter(this);
|
||||
|
||||
connect(edit,SIGNAL(returnPressed()),goToButton,SIGNAL(clicked()));*/
|
||||
resize(static_cast<int>(5*imageSize.width()),toolBar->height() + static_cast<int>(imageSize.height()*1.7));
|
||||
|
||||
this->setCursor(QCursor(Qt::ArrowCursor));
|
||||
|
||||
|
||||
}
|
||||
|
||||
GoToFlow::~GoToFlow()
|
||||
{
|
||||
delete flow;
|
||||
@ -84,6 +74,15 @@ void GoToFlow::keyPressEvent(QKeyEvent *event)
|
||||
GoToFlowWidget::keyPressEvent(event);
|
||||
}
|
||||
|
||||
void GoToFlow::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
|
||||
toolBar->move(0, event->size().height() - toolBar->height());
|
||||
toolBar->setFixedWidth(width());
|
||||
}
|
||||
|
||||
|
||||
void GoToFlow::centerSlide(int slide)
|
||||
{
|
||||
if(flow->centerIndex()!=slide)
|
||||
|
||||
Reference in New Issue
Block a user