mirror of
https://github.com/YACReader/yacreader
synced 2025-07-18 13:04:28 -04:00
fixed appearance in mac os x
This commit is contained in:
@ -193,7 +193,11 @@ void LibraryWindow::doLayout()
|
|||||||
selectedLibrary->setContextMenuPolicy(Qt::ActionsContextMenu);
|
selectedLibrary->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||||
selectedLibrary->setAttribute(Qt::WA_MacShowFocusRect,false);
|
selectedLibrary->setAttribute(Qt::WA_MacShowFocusRect,false);
|
||||||
selectedLibrary->setFocusPolicy(Qt::NoFocus);
|
selectedLibrary->setFocusPolicy(Qt::NoFocus);
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
l->setContentsMargins(0,0,0,0);
|
||||||
|
#else
|
||||||
l->setContentsMargins(sHorizontal->handleWidth(),0,0,0);
|
l->setContentsMargins(sHorizontal->handleWidth(),0,0,0);
|
||||||
|
#endif
|
||||||
|
|
||||||
YACReaderTitledToolBar * librariesTitle = new YACReaderTitledToolBar(tr("LIBRARIES"));
|
YACReaderTitledToolBar * librariesTitle = new YACReaderTitledToolBar(tr("LIBRARIES"));
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n/*ame*/, QString
|
|||||||
|
|
||||||
QPixmap iconPixmap(":/images/libraryIcon.png");
|
QPixmap iconPixmap(":/images/libraryIcon.png");
|
||||||
icon = new QLabel(this);
|
icon = new QLabel(this);
|
||||||
icon->setAutoFillBackground(true);
|
|
||||||
icon->setPixmap(iconPixmap);
|
icon->setPixmap(iconPixmap);
|
||||||
|
|
||||||
nameLabel = new QLabel(name,this);
|
nameLabel = new QLabel(name,this);
|
||||||
|
|
||||||
options = new QToolButton(this);
|
options = new QToolButton(this);
|
||||||
@ -125,7 +125,11 @@ void YACReaderLibraryItemWidget::deselect()
|
|||||||
|
|
||||||
void YACReaderLibraryItemWidget::select()
|
void YACReaderLibraryItemWidget::select()
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
QString styleSheet ="color: white; background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6BAFE4, stop: 1 #3984D2); border-top: 2px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5EA3DF, stop: 1 #73B8EA); border-left:none;border-right:none;border-bottom:1px solid #3577C2;";
|
||||||
|
#else
|
||||||
QString styleSheet = "color: white; background-color:#BBBBBB; font-weight:bold;";
|
QString styleSheet = "color: white; background-color:#BBBBBB; font-weight:bold;";
|
||||||
|
#endif
|
||||||
setStyleSheet(styleSheet);
|
setStyleSheet(styleSheet);
|
||||||
|
|
||||||
options->setHidden(false);
|
options->setHidden(false);
|
||||||
|
@ -17,8 +17,11 @@ YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *p
|
|||||||
setStyleSheet(styleSheet);
|
setStyleSheet(styleSheet);
|
||||||
|
|
||||||
QLabel * nameLabel = new QLabel(title,this);
|
QLabel * nameLabel = new QLabel(title,this);
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
QString nameLabelStyleSheet = "QLabel {color:#656565; padding:0 0 0 0px; margin:0px; font-size:11px; font-weight:bold;}";
|
QString nameLabelStyleSheet = "QLabel {color:#707E8C; padding:0 0 0 7px; margin:0px; font-size:11px; font-weight:bold;}";
|
||||||
|
#else
|
||||||
|
QString nameLabelStyleSheet = "QLabel {color:#656565; padding:0 0 0 0px; margin:0px; font-size:11px; font-weight:bold;}";
|
||||||
|
#endif
|
||||||
nameLabel->setStyleSheet(nameLabelStyleSheet);
|
nameLabel->setStyleSheet(nameLabelStyleSheet);
|
||||||
|
|
||||||
mainLayout->addWidget(nameLabel,Qt::AlignLeft);
|
mainLayout->addWidget(nameLabel,Qt::AlignLeft);
|
||||||
|
Reference in New Issue
Block a user