mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
removed top decoration bar from go to flow widget
This commit is contained in:
parent
00d5c85417
commit
ef33a90c1a
@ -47,7 +47,7 @@ GoToFlow::GoToFlow(QWidget *parent,FlowType flowType)
|
|||||||
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
|
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
|
||||||
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(showSlide(unsigned int)));
|
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(showSlide(unsigned int)));
|
||||||
|
|
||||||
mainLayout->insertWidget(1,flow);
|
mainLayout->insertWidget(0,flow);
|
||||||
mainLayout->setStretchFactor(flow,1);
|
mainLayout->setStretchFactor(flow,1);
|
||||||
|
|
||||||
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
|
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
#include "goto_flow_decorationbar.h"
|
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
|
||||||
#include <qlabel.h>
|
|
||||||
|
|
||||||
GoToFlowDecorationBar::GoToFlowDecorationBar(QWidget * parent)
|
|
||||||
:QWidget(parent)
|
|
||||||
{
|
|
||||||
QHBoxLayout * topBar = new QHBoxLayout();
|
|
||||||
|
|
||||||
QLabel * imgTopLeft = new QLabel();
|
|
||||||
QLabel * imgTopRight = new QLabel();
|
|
||||||
QLabel * imgTopMiddle = new QLabel();
|
|
||||||
QPixmap pL(":/images/imgTopLeft.png");
|
|
||||||
QPixmap pM(":/images/imgTopMiddle.png");
|
|
||||||
QPixmap pR(":/images/imgTopRight.png");
|
|
||||||
imgTopLeft->setPixmap(pL);
|
|
||||||
imgTopRight->setPixmap(pR);
|
|
||||||
imgTopMiddle->setPixmap(pM);
|
|
||||||
imgTopMiddle->setScaledContents(true);
|
|
||||||
|
|
||||||
topBar->addWidget(imgTopLeft);
|
|
||||||
topBar->addWidget(imgTopMiddle);
|
|
||||||
topBar->addWidget(imgTopRight);
|
|
||||||
topBar->setStretchFactor(imgTopLeft,0);
|
|
||||||
topBar->setStretchFactor(imgTopMiddle,1);
|
|
||||||
topBar->setStretchFactor(imgTopRight,0);
|
|
||||||
|
|
||||||
topBar->setMargin(0);
|
|
||||||
topBar->setSpacing(0);
|
|
||||||
|
|
||||||
setLayout(topBar);
|
|
||||||
}
|
|
@ -1,13 +0,0 @@
|
|||||||
#ifndef GOTO_FLOW_DECORATIONBAR_H
|
|
||||||
#define GOTO_FLOW_DECORATIONBAR_H
|
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
|
|
||||||
class GoToFlowDecorationBar : public QWidget
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
public:
|
|
||||||
GoToFlowDecorationBar(QWidget * parent = 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -28,7 +28,7 @@ GoToFlowGL::GoToFlowGL(QWidget* parent, FlowType flowType)
|
|||||||
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
|
connect(toolBar,SIGNAL(goTo(unsigned int)),this,SIGNAL(goToPage(unsigned int)));
|
||||||
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(setCenterIndex(unsigned int)));
|
connect(toolBar,SIGNAL(setCenter(unsigned int)),flow,SLOT(setCenterIndex(unsigned int)));
|
||||||
|
|
||||||
mainLayout->insertWidget(1,flow);
|
mainLayout->insertWidget(0,flow);
|
||||||
mainLayout->setStretchFactor(flow,1);
|
mainLayout->setStretchFactor(flow,1);
|
||||||
|
|
||||||
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
|
resize(static_cast<int>(5*imageSize.width()),static_cast<int>(imageSize.height()*1.7));
|
||||||
|
@ -16,10 +16,8 @@ GoToFlowWidget::GoToFlowWidget(QWidget * parent)
|
|||||||
mainLayout->setMargin(0);
|
mainLayout->setMargin(0);
|
||||||
mainLayout->setSpacing(0);
|
mainLayout->setSpacing(0);
|
||||||
|
|
||||||
topBar = new GoToFlowDecorationBar(this);
|
|
||||||
toolBar = new GoToFlowToolBar(this);
|
toolBar = new GoToFlowToolBar(this);
|
||||||
|
|
||||||
mainLayout->addWidget(topBar);
|
|
||||||
mainLayout->addWidget(toolBar);
|
mainLayout->addWidget(toolBar);
|
||||||
|
|
||||||
mainLayout->setMargin(0);
|
mainLayout->setMargin(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user