From 45bb72ae21b056dbdc51a418fc0b12f63ffacf7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 19 May 2013 15:29:03 +0200 Subject: [PATCH] A?adidos textos finales no_libraries_widget e import_widget(faltan traducciones). Corregido el color del link en el di?log del servidor. A?adida implementaci?n de men? personalizado (dark). --- YACReaderLibrary/import_widget.cpp | 2 +- YACReaderLibrary/library_window.cpp | 4 +-- YACReaderLibrary/no_libraries_widget.cpp | 2 +- YACReaderLibrary/server_config_dialog.cpp | 2 +- custom_widgets/custom_widgets.pri | 4 ++- custom_widgets/yacreader_dark_menu.cpp | 38 +++++++++++++++++++++++ custom_widgets/yacreader_dark_menu.h | 14 +++++++++ 7 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 custom_widgets/yacreader_dark_menu.cpp create mode 100644 custom_widgets/yacreader_dark_menu.h diff --git a/YACReaderLibrary/import_widget.cpp b/YACReaderLibrary/import_widget.cpp index 1b27c1f5..517dd396 100644 --- a/YACReaderLibrary/import_widget.cpp +++ b/YACReaderLibrary/import_widget.cpp @@ -342,7 +342,7 @@ void ImportWidget::setUpdateLook() { iconLabel->setPixmap(QPixmap(":/images/updatingIcon.png")); text->setText(""+tr("Updating the library")+""); - textDescription->setText(""+tr("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")+""); + textDescription->setText(""+tr("

The current library is being updated. For faster updates, please, keep your libraries updated frequently.

You can stop the process and continue updating this library later.")+""); } void ImportWidget::clearScene() diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 977404cd..098bfbd2 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -45,7 +45,7 @@ #include "tablemodel.h" #include "yacreader_tool_bar_stretch.h" - +#include "yacreader_dark_menu.h" // LibraryWindow::LibraryWindow() @@ -462,9 +462,9 @@ void LibraryWindow::createActions() comicFlow->addAction(toggleFullScreenAction); comicFlow->addAction(openComicAction); - comicFlow->setContextMenuPolicy(Qt::ActionsContextMenu); + } //TODO unificar con disableActions diff --git a/YACReaderLibrary/no_libraries_widget.cpp b/YACReaderLibrary/no_libraries_widget.cpp index 093523af..12efb9e3 100644 --- a/YACReaderLibrary/no_libraries_widget.cpp +++ b/YACReaderLibrary/no_libraries_widget.cpp @@ -25,7 +25,7 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent) : QLabel * text = new QLabel(""+tr("You don't have any librarires yet")+""); text->setStyleSheet("QLabel {font-size:25px;font-weight:bold;}"); - QLabel * textDescription = new QLabel(""+tr("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")+""); + QLabel * textDescription = new QLabel(""+tr("

You can create a library in any folder, YACReaderLibrary will import all comics and folders from this folder. If you have created any library in the past you can open them.

Don't forget that you can use YACReader as a stand alone application for reading the comics on your computer.

")+""); textDescription->setWordWrap(true); textDescription->setMaximumWidth(330); diff --git a/YACReaderLibrary/server_config_dialog.cpp b/YACReaderLibrary/server_config_dialog.cpp index d4e6e0d4..fa19cbd4 100644 --- a/YACReaderLibrary/server_config_dialog.cpp +++ b/YACReaderLibrary/server_config_dialog.cpp @@ -78,7 +78,7 @@ ServerConfigDialog::ServerConfigDialog(QWidget * parent) qrMessage->setWordWrap(true); qrMessage->setFixedWidth(200); - QLabel * propaganda = new QLabel(tr("YACReader is now available for iOS devices, the best comic reading experience now in your iPad, iPhone or iPod touch. Discover it! "),this); + QLabel * propaganda = new QLabel(tr("YACReader is now available for iOS devices, the best comic reading experience now in your iPad, iPhone or iPod touch. Discover it! "),this); propaganda->move(36,375); propaganda->setStyleSheet("QLabel {color:#1F1F1F; font-size:16px; font-family: Arial; font-style: italic;}" "QLabel::a {color:#1A1A1A}"); diff --git a/custom_widgets/custom_widgets.pri b/custom_widgets/custom_widgets.pri index 68e0deae..acc81c54 100644 --- a/custom_widgets/custom_widgets.pri +++ b/custom_widgets/custom_widgets.pri @@ -11,6 +11,7 @@ HEADERS += $$PWD/help_about_dialog.h \ $$PWD/yacreader_search_line_edit.h \ $$PWD/yacreader_spin_slider_widget.h \ $$PWD/yacreader_tool_bar_stretch.h \ + $$PWD/yacreader_dark_menu.h SOURCES += $$PWD/help_about_dialog.cpp \ $$PWD/yacreader_field_edit.cpp yacreader_search_line_edit.cpp \ @@ -21,4 +22,5 @@ SOURCES += $$PWD/help_about_dialog.cpp \ $$PWD/yacreader_options_dialog.cpp \ $$PWD/yacreader_search_line_edit.cpp \ $$PWD/yacreader_spin_slider_widget.cpp \ - $$PWD/yacreader_tool_bar_stretch.cpp \ \ No newline at end of file + $$PWD/yacreader_tool_bar_stretch.cpp \ + $$PWD/yacreader_dark_menu.cpp \ No newline at end of file diff --git a/custom_widgets/yacreader_dark_menu.cpp b/custom_widgets/yacreader_dark_menu.cpp new file mode 100644 index 00000000..0ed7118c --- /dev/null +++ b/custom_widgets/yacreader_dark_menu.cpp @@ -0,0 +1,38 @@ +#include "yacreader_dark_menu.h" + +#include +#include +#include + +YACReaderDarkMenu::YACReaderDarkMenu(QWidget * parent) + :QMenu(parent) +{ + //solid color: #454545 + QString style = "QMenu {background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6B6B6B, stop: 1 #424242); " + "border-left: 1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BCBCBC, stop: 1 #4C4C4C);" + "border-right: 1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #BCBCBC, stop: 1 #4C4C4C);" + "border-top: 1px solid #BCBCBC;" + "border-bottom: 1px solid #4C4C4C;" + "padding-top:5px;padding-bottom:5px;}" + "QMenu::separator {height:0px;border-top: 1px solid #292929; border-bottom:1px solid #737373; margin-left:-1px; margin-right:-1px;}" + "QMenu::item {color:#CFD1D1;padding: 5px 25px 5px 32px;}" + "QMenu::item::selected {background-color:#242424;border-top: 1px solid #151515; border-bottom:1px solid #737373;}" + "QMenu::icon {padding-left:15px;}"; + + setStyleSheet(style); + + /* + QPixmap p(":/images/icon.png"); + QLabel * l = new QLabel(); + l->setPixmap(p); + l->move(0,-10); + + //test + YACReaderDarkMenu * customMenu = new YACReaderDarkMenu(this); + customMenu->addAction(toggleFullScreenAction); + customMenu->addAction(createLibraryAction); + customMenu->addSeparator(); + customMenu->addAction(openComicAction); + customMenu->show(); + */ +} \ No newline at end of file diff --git a/custom_widgets/yacreader_dark_menu.h b/custom_widgets/yacreader_dark_menu.h new file mode 100644 index 00000000..6d28749d --- /dev/null +++ b/custom_widgets/yacreader_dark_menu.h @@ -0,0 +1,14 @@ +#ifndef YACREADER_DARK_MENU_H +#define YACREADER_DARK_MENU_H + +#include + + +class YACReaderDarkMenu : public QMenu +{ + Q_OBJECT + public: + YACReaderDarkMenu(QWidget * parent = 0); +}; + +#endif // YACREADER_DARK_MENU_H \ No newline at end of file