diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2532c600..8003bf98 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,9 +4,11 @@ A Añadidos títulos "Bibliotecas" y "Carpetas" a la barra de navegación Nuevos iconos para seleccionar la carpeta raíz, expandir y contraer todos. Botón para cambiar el puerto del servidor por el usuario. -Ahora las columnas de la tabla de cómics pueden reordenarse +Ahora las columnas de la lista de cómics pueden reordenarse Ahora YACReaderLibrary sólo permite una instancia ejecutandose. Columna leído añadida. +Cambiado estilo de la lista de cócmis +Corregidos bugs relacionados con realizar operaciones sobre cómics cuando no había ninguno seleccionado en la lista de cómics 6.2 Nueva ventana de "bienvenida" diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 15144fd2..918982a3 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -166,9 +166,13 @@ void LibraryWindow::doLayout() foldersView->setSelectionBehavior(QAbstractItemView::SelectRows); comicView->setAlternatingRowColors(true); - comicView->setStyleSheet("QTableView {alternate-background-color: #F2F2F2;background-color: #FAFAFA;}" - "QTableView::item {border-bottom: 1px solid #E9E9E9;border-top: 1px solid #FEFEFE; padding-bottom:1px;}" - "QTableView::item:selected {outline: none; border-bottom: 1px solid #A9A9A9;border-top: 1px solid #A9A9A9; padding-bottom:1px; background-color: #A9A9A9; color: #FFFFFF; }" + comicView->verticalHeader()->setAlternatingRowColors(true); + comicView->setStyleSheet("QTableView {alternate-background-color: #F2F2F2;background-color: #FAFAFA; outline: 0px;}" + "QTableCornerButton::section {background-color:#F5F5F5; border:none; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4);}" + "QTableView::item {outline: 0px; border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE; padding-bottom:1px; color:#252626;}" + "QTableView::item:selected {outline: 0px; border-bottom: 1px solid #7A8080;border-top: 1px solid #7A8080; padding-bottom:1px; background-color: #7A8080; color: #FFFFFF; }" + "QHeaderView::section:horizontal {background-color:#F5F5F5; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4); border-left:none; border-top:none; padding:4px; color:#313232;}" + "QHeaderView::section:vertical {border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE;}" //"QTableView::item:hover {border-bottom: 1px solid #A3A3A3;border-top: 1px solid #A3A3A3; padding-bottom:1px; background-color: #A3A3A3; color: #FFFFFF; }" ""); //comicView->setItemDelegate(new YACReaderComicViewDelegate()); @@ -995,7 +999,8 @@ void LibraryWindow::openComic() void LibraryWindow::setCurrentComicsStatusReaded(bool readed) { - comicFlow->setMarks(dmCV->setComicsRead(comicView->selectionModel()->selectedRows(),readed)); + + comicFlow->setMarks(dmCV->setComicsRead(getSelectedComics(),readed)); comicFlow->updateMarks(); } @@ -1304,7 +1309,7 @@ void LibraryWindow::setFoldersFilter(QString filter) void LibraryWindow::showProperties() { - QModelIndexList indexList = comicView->selectionModel()->selectedRows(); + QModelIndexList indexList = getSelectedComics(); QList comics = dmCV->getComics(indexList); ComicDB c = comics[0]; @@ -1319,7 +1324,7 @@ void LibraryWindow::showProperties() void LibraryWindow::asignNumbers() { - QModelIndexList indexList = comicView->selectionModel()->selectedRows(); + QModelIndexList indexList = getSelectedComics(); int startingNumber = indexList[0].row()+1; if(indexList.count()>1) @@ -1447,4 +1452,16 @@ void LibraryWindow::manageUpdatingError(const QString & error) void LibraryWindow::manageOpeningLibraryError(const QString & error) { QMessageBox::critical(this,tr("Error opening the library"),error); +} + +QModelIndexList LibraryWindow::getSelectedComics() +{ + //se fuerza a que haya almenos una fila seleccionada TODO comprobar se se puede forzar a la tabla a que lo haga automáticamente + QModelIndexList selection = comicView->selectionModel()->selectedRows(); + if(selection.count()==0) + { + comicView->selectRow(comicFlow->centerIndex()); + selection = comicView->selectionModel()->selectedRows(); + } + return selection; } \ No newline at end of file diff --git a/YACReaderLibrary/library_window.h b/YACReaderLibrary/library_window.h index 12d22aa7..18254aa3 100644 --- a/YACReaderLibrary/library_window.h +++ b/YACReaderLibrary/library_window.h @@ -232,6 +232,7 @@ public: void manageCreatingError(const QString & error); void manageUpdatingError(const QString & error); void manageOpeningLibraryError(const QString & error); + QModelIndexList getSelectedComics(); }; #endif diff --git a/custom_widgets/yacreader_titled_toolbar.cpp b/custom_widgets/yacreader_titled_toolbar.cpp index 8cde71a7..5bda72ed 100644 --- a/custom_widgets/yacreader_titled_toolbar.cpp +++ b/custom_widgets/yacreader_titled_toolbar.cpp @@ -18,7 +18,7 @@ YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *p QLabel * nameLabel = new QLabel(title,this); - QString nameLabelStyleSheet = "QLabel {color:#454545; padding:0 0 0 0px; margin:0px; font-size:13px; font-weight:bold;}"; + 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); diff --git a/images/colapse.png b/images/colapse.png index 2a0b5782..6892fad8 100644 Binary files a/images/colapse.png and b/images/colapse.png differ diff --git a/images/expand.png b/images/expand.png index 04c25897..744225d8 100644 Binary files a/images/expand.png and b/images/expand.png differ diff --git a/images/setRoot.png b/images/setRoot.png index b71a6541..d95234c2 100644 Binary files a/images/setRoot.png and b/images/setRoot.png differ