fixed appearance in mac os x

This commit is contained in:
Luis Ángel San Martín
2013-06-15 22:28:27 +02:00
parent 9a22816679
commit 338eac7d55
3 changed files with 16 additions and 5 deletions

View File

@ -193,7 +193,11 @@ void LibraryWindow::doLayout()
selectedLibrary->setContextMenuPolicy(Qt::ActionsContextMenu);
selectedLibrary->setAttribute(Qt::WA_MacShowFocusRect,false);
selectedLibrary->setFocusPolicy(Qt::NoFocus);
#ifdef Q_OS_MAC
l->setContentsMargins(0,0,0,0);
#else
l->setContentsMargins(sHorizontal->handleWidth(),0,0,0);
#endif
YACReaderTitledToolBar * librariesTitle = new YACReaderTitledToolBar(tr("LIBRARIES"));

View File

@ -16,8 +16,8 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n/*ame*/, QString
QPixmap iconPixmap(":/images/libraryIcon.png");
icon = new QLabel(this);
icon->setAutoFillBackground(true);
icon->setPixmap(iconPixmap);
nameLabel = new QLabel(name,this);
options = new QToolButton(this);
@ -125,7 +125,11 @@ void YACReaderLibraryItemWidget::deselect()
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;";
#endif
setStyleSheet(styleSheet);
options->setHidden(false);

View File

@ -17,8 +17,11 @@ YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *p
setStyleSheet(styleSheet);
QLabel * nameLabel = new QLabel(title,this);
QString nameLabelStyleSheet = "QLabel {color:#656565; padding:0 0 0 0px; margin:0px; font-size:11px; font-weight:bold;}";
#ifdef Q_OS_MAC
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);
mainLayout->addWidget(nameLabel,Qt::AlignLeft);