diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 668b8945..28daa464 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -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")); diff --git a/custom_widgets/yacreader_library_item_widget.cpp b/custom_widgets/yacreader_library_item_widget.cpp index a93e31fe..f1f9358d 100644 --- a/custom_widgets/yacreader_library_item_widget.cpp +++ b/custom_widgets/yacreader_library_item_widget.cpp @@ -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); @@ -134,4 +138,4 @@ void YACReaderLibraryItemWidget::select() icon->setPixmap(iconPixmap); isSelected = true; -} \ No newline at end of file +} diff --git a/custom_widgets/yacreader_titled_toolbar.cpp b/custom_widgets/yacreader_titled_toolbar.cpp index aa4790fb..1d8e2cf5 100644 --- a/custom_widgets/yacreader_titled_toolbar.cpp +++ b/custom_widgets/yacreader_titled_toolbar.cpp @@ -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); @@ -43,4 +46,4 @@ void YACReaderTitledToolBar::addAction(QAction * action) //tb->setStyleSheet("QToolButton:hover {background-color:#C5C5C5;}"); mainLayout->addWidget(tb); -} \ No newline at end of file +}