mirror of
https://github.com/YACReader/yacreader
synced 2026-02-14 02:52:59 -05:00
nuevo separador para la toolbar de yacreader en osx
This commit is contained in:
@ -20,11 +20,33 @@
|
|||||||
class MacToolBarSeparator : public QWidget
|
class MacToolBarSeparator : public QWidget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MacToolBarSeparator(int width = 10, QWidget * parent =0)
|
MacToolBarSeparator(QWidget * parent =0)
|
||||||
:QWidget(parent)
|
:QWidget(parent)
|
||||||
{
|
{
|
||||||
setFixedWidth(width);
|
setFixedWidth(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
Q_UNUSED(event);
|
||||||
|
QPainter painter(this);
|
||||||
|
|
||||||
|
QLinearGradient lG(0,0,0,height());
|
||||||
|
|
||||||
|
lG.setColorAt(0,QColor(128,128,128,0));
|
||||||
|
lG.setColorAt(0.5,QColor(128,128,128,255));
|
||||||
|
lG.setColorAt(1,QColor(128,128,128,0));
|
||||||
|
|
||||||
|
painter.fillRect(0,0,1,height(),lG);
|
||||||
|
|
||||||
|
QLinearGradient lG2(1,0,1,height());
|
||||||
|
|
||||||
|
lG2.setColorAt(0,QColor(220,220,220,0));
|
||||||
|
lG2.setColorAt(0.5,QColor(220,220,220,255));
|
||||||
|
lG2.setColorAt(1,QColor(220,220,220,0));
|
||||||
|
|
||||||
|
painter.fillRect(1,0,1,height(),lG2);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -195,7 +217,7 @@ void MainWindowViewer::createActions()
|
|||||||
//adjustWidth->setCheckable(true);
|
//adjustWidth->setCheckable(true);
|
||||||
adjustHeight->setDisabled(true);
|
adjustHeight->setDisabled(true);
|
||||||
adjustHeight->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
adjustHeight->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
||||||
adjustHeight->setToolTip(tr("Fit image to ..."));
|
adjustHeight->setToolTip(tr("Fit image to height"));
|
||||||
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
||||||
connect(adjustHeight, SIGNAL(triggered()),this,SLOT(fitToHeight()));
|
connect(adjustHeight, SIGNAL(triggered()),this,SLOT(fitToHeight()));
|
||||||
|
|
||||||
@ -204,7 +226,7 @@ void MainWindowViewer::createActions()
|
|||||||
//adjustWidth->setCheckable(true);
|
//adjustWidth->setCheckable(true);
|
||||||
adjustWidth->setDisabled(true);
|
adjustWidth->setDisabled(true);
|
||||||
adjustWidth->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
adjustWidth->setChecked(Configuration::getConfiguration().getAdjustToWidth());
|
||||||
adjustWidth->setToolTip(tr("Fit image to ..."));
|
adjustWidth->setToolTip(tr("Fit image to width"));
|
||||||
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
//adjustWidth->setIcon(QIcon(":/images/fitWidth.png"));
|
||||||
connect(adjustWidth, SIGNAL(triggered()),this,SLOT(fitToWidth()));
|
connect(adjustWidth, SIGNAL(triggered()),this,SLOT(fitToWidth()));
|
||||||
|
|
||||||
@ -357,7 +379,7 @@ void MainWindowViewer::createToolBars()
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
comicToolBar->addWidget(new MacToolBarSeparator(5));
|
comicToolBar->addWidget(new MacToolBarSeparator);
|
||||||
#else
|
#else
|
||||||
comicToolBar->addSeparator();
|
comicToolBar->addSeparator();
|
||||||
#endif
|
#endif
|
||||||
@ -426,8 +448,12 @@ void MainWindowViewer::createToolBars()
|
|||||||
comicToolBar->addSeparator();
|
comicToolBar->addSeparator();
|
||||||
#endif
|
#endif
|
||||||
comicToolBar->addAction(showDictionaryAction);
|
comicToolBar->addAction(showDictionaryAction);
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
comicToolBar->addWidget(new MacToolBarSeparator);
|
||||||
|
#else
|
||||||
comicToolBar->addWidget(new QToolBarStretch());
|
comicToolBar->addWidget(new QToolBarStretch());
|
||||||
|
#endif
|
||||||
|
|
||||||
comicToolBar->addAction(showFlowAction);
|
comicToolBar->addAction(showFlowAction);
|
||||||
comicToolBar->addAction(showShorcutsAction);
|
comicToolBar->addAction(showShorcutsAction);
|
||||||
|
|||||||
Reference in New Issue
Block a user