diff --git a/YACReader/bookmarks_dialog.cpp b/YACReader/bookmarks_dialog.cpp index 627af7bb..9c504f8b 100644 --- a/YACReader/bookmarks_dialog.cpp +++ b/YACReader/bookmarks_dialog.cpp @@ -10,12 +10,12 @@ #include "bookmarks.h" BookmarksDialog::BookmarksDialog(QWidget * parent) - :QDialog(parent,Qt::FramelessWindowHint) + :QDialog(parent) { setModal(true); - animation = new QPropertyAnimation(this,"windowOpacity"); - animation->setDuration(150); + //animation = new QPropertyAnimation(this,"windowOpacity"); + //animation->setDuration(150); QHBoxLayout * layout = new QHBoxLayout(); @@ -25,6 +25,13 @@ BookmarksDialog::BookmarksDialog(QWidget * parent) pages.push_back(new QLabel(tr("Lastest Page"))); for(int i=0;i<3;i++) pages.push_back(new QLabel("-")); + + QString labelsStyle = "QLabel {color:white;}"; + + foreach(QLabel * label,pages) + { + label->setStyleSheet(labelsStyle); + } int heightDesktopResolution = QApplication::desktop()->screenGeometry().height(); int height,width; @@ -64,20 +71,26 @@ BookmarksDialog::BookmarksDialog(QWidget * parent) QHBoxLayout * buttons = new QHBoxLayout(); cancel = new QPushButton(tr("Close")); - cancel->setFlat(true); + //cancel->setFlat(true); connect(cancel,SIGNAL(clicked()),this,SLOT(hide())); buttons->addStretch(); buttons->addWidget(cancel); + cancel->setStyleSheet("QPushButton {color:white; border:1px solid #BBBBBB; padding:3px 5px 3px 5px;}"); + QVBoxLayout * l = new QVBoxLayout(); - l->addWidget(new QLabel(tr("Click on any image to go to the bookmark")),0,Qt::AlignCenter); + l->addWidget(new QLabel(""+tr("Click on any image to go to the bookmark")+""),0,Qt::AlignCenter); l->addLayout(layout); - l->addLayout(buttons); + //l->addLayout(buttons); - this->setPalette(QPalette(QColor(25,25,25))); - //this->setAutoFillBackground(true); - setLayout(l); + QPalette Pal(palette()); + // set black background + Pal.setColor(QPalette::Background, QColor("#454545")); + this->setAutoFillBackground(true); + this->setPalette(Pal); + + setLayout(l); } void BookmarksDialog::setBookmarks(const Bookmarks & bm) @@ -163,7 +176,7 @@ void BookmarksDialog::keyPressEvent(QKeyEvent * event) if(event->key() == Qt::Key_M) hide(); } - +/* void BookmarksDialog::show() { QDialog::show(); @@ -179,4 +192,4 @@ void BookmarksDialog::hide() animation->setStartValue(1); animation->setEndValue(0); animation->start(); -} +}*/ diff --git a/YACReader/bookmarks_dialog.h b/YACReader/bookmarks_dialog.h index 363ed372..1a6b8615 100644 --- a/YACReader/bookmarks_dialog.h +++ b/YACReader/bookmarks_dialog.h @@ -28,15 +28,15 @@ bool eventFilter(QObject *obj, QEvent *event); void keyPressEvent(QKeyEvent * event); - QPropertyAnimation * animation; + //QPropertyAnimation * animation; public: BookmarksDialog(QWidget * parent = 0); public slots: void setBookmarks(const Bookmarks & bookmarks); - void show(); - void hide(); + //void show(); + //void hide(); signals: void goToPage(unsigned int page);