mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 14:34:42 -04:00
modificado el estilo de los splitters y la toolbar de comics
This commit is contained in:
46
custom_widgets/yacreader_titled_toolbar.cpp
Normal file
46
custom_widgets/yacreader_titled_toolbar.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include "yacreader_titled_toolbar.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QToolButton>
|
||||
#include <QGraphicsDropShadowEffect>
|
||||
|
||||
YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
QHBoxLayout * mainLayout = new QHBoxLayout;
|
||||
mainLayout->setMargin(0);
|
||||
mainLayout->setSpacing(0);
|
||||
|
||||
QString styleSheet = "QWidget {border:0px;}";
|
||||
setStyleSheet(styleSheet);
|
||||
|
||||
QLabel * nameLabel = new QLabel(title,this);
|
||||
|
||||
QString nameLabelStyleSheet = "QLabel {color:#656565; padding:0 0 0 0px; margin:0px; font-size:13px; font-weight:bold;}";
|
||||
nameLabel->setStyleSheet(nameLabelStyleSheet);
|
||||
|
||||
mainLayout->addWidget(nameLabel,Qt::AlignLeft);
|
||||
mainLayout->addStretch();
|
||||
|
||||
setLayout(mainLayout);
|
||||
|
||||
setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Minimum);
|
||||
|
||||
setMinimumHeight(25);
|
||||
}
|
||||
|
||||
|
||||
void YACReaderTitledToolBar::addAction(QAction * action)
|
||||
{
|
||||
QHBoxLayout * mainLayout = dynamic_cast<QHBoxLayout *>(layout());
|
||||
|
||||
QToolButton * tb = new QToolButton(this);
|
||||
tb->setDefaultAction(action);
|
||||
tb->setIconSize(QSize(16,16));
|
||||
tb->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
|
||||
tb->setStyleSheet("QToolButton:hover {background-color:#A5A5A5;}");
|
||||
|
||||
mainLayout->addWidget(tb);
|
||||
}
|
Reference in New Issue
Block a user