Use SVG icons in YACReader's toolbar (windows/linux) and in shortcuts dialog

This commit is contained in:
Luis Ángel San Martín 2022-10-20 17:51:22 +02:00
parent ebcb3d8a91
commit 4c66b8ecad
99 changed files with 190 additions and 149 deletions

View File

@ -36,40 +36,48 @@
#include <QDate> #include <QDate>
#include <QMenuBar> #include <QMenuBar>
/* TODO remove, no longer used // TODO there are no SVG assets in macos yet
#ifdef Q_OS_MAC // we need two sets of icons, one for the toolbar and one for the context menu because of this bug (QTBUG-96553): https://bugreports.qt.io/browse/QTBUG-96553
class MacToolBarSeparator : public QWidget
QString addExtensionToIconPath(const QString &path)
{ {
public: #ifdef Q_OS_MAC
MacToolBarSeparator(QWidget * parent =0) return path + ".png";
:QWidget(parent) #else
{ return path + ".svg";
setFixedWidth(2); #endif
} }
void paintEvent(QPaintEvent *event) QString addExtensionToIconPathInToolbar(const QString &path)
{ {
Q_UNUSED(event); #ifdef Q_OS_MAC
QPainter painter(this); return path + ".png";
#else
return path + "_18x18.svg";
#endif
}
QLinearGradient lG(0,0,0,height()); QAction *actionWithCustomIcon(const QIcon &icon, const QAction *action)
{
lG.setColorAt(0,QColor(128,128,128,0)); #ifdef Q_OS_MAC
lG.setColorAt(0.5,QColor(128,128,128,255)); return action;
lG.setColorAt(1,QColor(128,128,128,0)); #else
auto a = new QAction(icon, action->text());
painter.fillRect(0,0,1,height(),lG); a->setEnabled(action->isEnabled());
a->setCheckable(action->isCheckable());
QLinearGradient lG2(1,0,1,height()); a->setChecked(action->isChecked());
lG2.setColorAt(0,QColor(220,220,220,0)); QObject::connect(a, &QAction::triggered, action, &QAction::triggered);
lG2.setColorAt(0.5,QColor(220,220,220,255)); QObject::connect(action, &QAction::enabledChanged, a, &QAction::setEnabled);
lG2.setColorAt(1,QColor(220,220,220,0)); QObject::connect(a, &QAction::toggled, action, &QAction::setChecked);
QObject::connect(action, &QAction::toggled, a, &QAction::setChecked);
painter.fillRect(1,0,1,height(),lG2); return a;
} #endif
}; }
#endif*/
MainWindowViewer::MainWindowViewer() MainWindowViewer::MainWindowViewer()
: QMainWindow(), fullscreen(false), toolbars(true), currentDirectory("."), currentDirectoryImgDest("."), isClient(false) : QMainWindow(), fullscreen(false), toolbars(true), currentDirectory("."), currentDirectoryImgDest("."), isClient(false)
@ -217,7 +225,7 @@ void MainWindowViewer::setupUI()
void MainWindowViewer::createActions() void MainWindowViewer::createActions()
{ {
openAction = new QAction(tr("&Open"), this); openAction = new QAction(tr("&Open"), this);
openAction->setIcon(QIcon(":/images/viewer_toolbar/open.png")); openAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/open")));
openAction->setToolTip(tr("Open a comic")); openAction->setToolTip(tr("Open a comic"));
openAction->setData(OPEN_ACTION_Y); openAction->setData(OPEN_ACTION_Y);
openAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_ACTION_Y)); openAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_ACTION_Y));
@ -244,7 +252,7 @@ void MainWindowViewer::createActions()
#endif #endif
openFolderAction = new QAction(tr("Open Folder"), this); openFolderAction = new QAction(tr("Open Folder"), this);
openFolderAction->setIcon(QIcon(":/images/viewer_toolbar/openFolder.png")); openFolderAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/openFolder")));
openFolderAction->setToolTip(tr("Open image folder")); openFolderAction->setToolTip(tr("Open image folder"));
openFolderAction->setData(OPEN_FOLDER_ACTION_Y); openFolderAction->setData(OPEN_FOLDER_ACTION_Y);
openFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_FOLDER_ACTION_Y)); openFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_FOLDER_ACTION_Y));
@ -268,28 +276,28 @@ void MainWindowViewer::createActions()
connect(clearRecentFilesAction, &QAction::triggered, this, &MainWindowViewer::clearRecentFiles); connect(clearRecentFilesAction, &QAction::triggered, this, &MainWindowViewer::clearRecentFiles);
saveImageAction = new QAction(tr("Save"), this); saveImageAction = new QAction(tr("Save"), this);
saveImageAction->setIcon(QIcon(":/images/viewer_toolbar/save.png")); saveImageAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/save")));
saveImageAction->setToolTip(tr("Save current page")); saveImageAction->setToolTip(tr("Save current page"));
saveImageAction->setData(SAVE_IMAGE_ACTION_Y); saveImageAction->setData(SAVE_IMAGE_ACTION_Y);
saveImageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SAVE_IMAGE_ACTION_Y)); saveImageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SAVE_IMAGE_ACTION_Y));
connect(saveImageAction, &QAction::triggered, this, &MainWindowViewer::saveImage); connect(saveImageAction, &QAction::triggered, this, &MainWindowViewer::saveImage);
openComicOnTheLeftAction = new QAction(tr("Previous Comic"), this); openComicOnTheLeftAction = new QAction(tr("Previous Comic"), this);
openComicOnTheLeftAction->setIcon(QIcon(":/images/viewer_toolbar/openPrevious.png")); openComicOnTheLeftAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/openPrevious")));
openComicOnTheLeftAction->setToolTip(tr("Open previous comic")); openComicOnTheLeftAction->setToolTip(tr("Open previous comic"));
openComicOnTheLeftAction->setData(OPEN_PREVIOUS_COMIC_ACTION_Y); openComicOnTheLeftAction->setData(OPEN_PREVIOUS_COMIC_ACTION_Y);
openComicOnTheLeftAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_PREVIOUS_COMIC_ACTION_Y)); openComicOnTheLeftAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_PREVIOUS_COMIC_ACTION_Y));
connect(openComicOnTheLeftAction, &QAction::triggered, this, &MainWindowViewer::openLeftComic); connect(openComicOnTheLeftAction, &QAction::triggered, this, &MainWindowViewer::openLeftComic);
openComicOnTheRightAction = new QAction(tr("Next Comic"), this); openComicOnTheRightAction = new QAction(tr("Next Comic"), this);
openComicOnTheRightAction->setIcon(QIcon(":/images/viewer_toolbar/openNext.png")); openComicOnTheRightAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/openNext")));
openComicOnTheRightAction->setToolTip(tr("Open next comic")); openComicOnTheRightAction->setToolTip(tr("Open next comic"));
openComicOnTheRightAction->setData(OPEN_NEXT_COMIC_ACTION_Y); openComicOnTheRightAction->setData(OPEN_NEXT_COMIC_ACTION_Y);
openComicOnTheRightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_NEXT_COMIC_ACTION_Y)); openComicOnTheRightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_NEXT_COMIC_ACTION_Y));
connect(openComicOnTheRightAction, &QAction::triggered, this, &MainWindowViewer::openRightComic); connect(openComicOnTheRightAction, &QAction::triggered, this, &MainWindowViewer::openRightComic);
goToPageOnTheLeftAction = new QAction(tr("&Previous"), this); goToPageOnTheLeftAction = new QAction(tr("&Previous"), this);
goToPageOnTheLeftAction->setIcon(QIcon(":/images/viewer_toolbar/previous.png")); goToPageOnTheLeftAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/previous")));
goToPageOnTheLeftAction->setShortcutContext(Qt::WidgetShortcut); goToPageOnTheLeftAction->setShortcutContext(Qt::WidgetShortcut);
goToPageOnTheLeftAction->setToolTip(tr("Go to previous page")); goToPageOnTheLeftAction->setToolTip(tr("Go to previous page"));
goToPageOnTheLeftAction->setData(PREV_ACTION_Y); goToPageOnTheLeftAction->setData(PREV_ACTION_Y);
@ -297,7 +305,7 @@ void MainWindowViewer::createActions()
connect(goToPageOnTheLeftAction, &QAction::triggered, viewer, &Viewer::left); connect(goToPageOnTheLeftAction, &QAction::triggered, viewer, &Viewer::left);
goToPageOnTheRightAction = new QAction(tr("&Next"), this); goToPageOnTheRightAction = new QAction(tr("&Next"), this);
goToPageOnTheRightAction->setIcon(QIcon(":/images/viewer_toolbar/next.png")); goToPageOnTheRightAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/next")));
goToPageOnTheRightAction->setShortcutContext(Qt::WidgetShortcut); goToPageOnTheRightAction->setShortcutContext(Qt::WidgetShortcut);
goToPageOnTheRightAction->setToolTip(tr("Go to next page")); goToPageOnTheRightAction->setToolTip(tr("Go to next page"));
goToPageOnTheRightAction->setData(NEXT_ACTION_Y); goToPageOnTheRightAction->setData(NEXT_ACTION_Y);
@ -305,27 +313,27 @@ void MainWindowViewer::createActions()
connect(goToPageOnTheRightAction, &QAction::triggered, viewer, &Viewer::right); connect(goToPageOnTheRightAction, &QAction::triggered, viewer, &Viewer::right);
adjustHeightAction = new QAction(tr("Fit Height"), this); adjustHeightAction = new QAction(tr("Fit Height"), this);
adjustHeightAction->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png")); adjustHeightAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/toHeight")));
// adjustWidth->setCheckable(true); // adjustWidth->setCheckable(true);
adjustHeightAction->setToolTip(tr("Fit image to height")); adjustHeightAction->setToolTip(tr("Fit image to height"));
// adjustWidth->setIcon(QIcon(":/images/fitWidth.png")); // adjustWidth->setIcon(QIcon(":/images/fitWidth.svg"));
adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y); adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y);
adjustHeightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_HEIGHT_ACTION_Y)); adjustHeightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_HEIGHT_ACTION_Y));
adjustHeightAction->setCheckable(true); adjustHeightAction->setCheckable(true);
connect(adjustHeightAction, &QAction::triggered, this, &MainWindowViewer::fitToHeight); connect(adjustHeightAction, &QAction::triggered, this, &MainWindowViewer::fitToHeight);
adjustWidthAction = new QAction(tr("Fit Width"), this); adjustWidthAction = new QAction(tr("Fit Width"), this);
adjustWidthAction->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png")); adjustWidthAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/toWidth")));
// adjustWidth->setCheckable(true); // adjustWidth->setCheckable(true);
adjustWidthAction->setToolTip(tr("Fit image to width")); adjustWidthAction->setToolTip(tr("Fit image to width"));
// adjustWidth->setIcon(QIcon(":/images/fitWidth.png")); // adjustWidth->setIcon(QIcon(":/images/fitWidth.svg"));
adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y); adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y);
adjustWidthAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_WIDTH_ACTION_Y)); adjustWidthAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_WIDTH_ACTION_Y));
adjustWidthAction->setCheckable(true); adjustWidthAction->setCheckable(true);
connect(adjustWidthAction, &QAction::triggered, this, &MainWindowViewer::fitToWidth); connect(adjustWidthAction, &QAction::triggered, this, &MainWindowViewer::fitToWidth);
adjustToFullSizeAction = new QAction(tr("Show full size"), this); adjustToFullSizeAction = new QAction(tr("Show full size"), this);
adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); adjustToFullSizeAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/full")));
adjustToFullSizeAction->setCheckable(false); adjustToFullSizeAction->setCheckable(false);
adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y); adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y);
adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y)); adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y));
@ -333,7 +341,7 @@ void MainWindowViewer::createActions()
connect(adjustToFullSizeAction, &QAction::triggered, this, &MainWindowViewer::adjustToFullSizeSwitch); connect(adjustToFullSizeAction, &QAction::triggered, this, &MainWindowViewer::adjustToFullSizeSwitch);
fitToPageAction = new QAction(tr("Fit to page"), this); fitToPageAction = new QAction(tr("Fit to page"), this);
fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/fitToPage.png")); fitToPageAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/fitToPage")));
fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y); fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y);
fitToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FIT_TO_PAGE_ACTION_Y)); fitToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FIT_TO_PAGE_ACTION_Y));
fitToPageAction->setCheckable(true); fitToPageAction->setCheckable(true);
@ -369,7 +377,7 @@ void MainWindowViewer::createActions()
connect(resetZoomAction, &QAction::triggered, this, &MainWindowViewer::resetZoomLevel); connect(resetZoomAction, &QAction::triggered, this, &MainWindowViewer::resetZoomLevel);
showZoomSliderlAction = new QAction(tr("Show zoom slider"), this); showZoomSliderlAction = new QAction(tr("Show zoom slider"), this);
showZoomSliderlAction->setIcon(QIcon(":/images/viewer_toolbar/zoom.png")); showZoomSliderlAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/zoom")));
increasePageZoomAction = new QAction(tr("Zoom+"), this); increasePageZoomAction = new QAction(tr("Zoom+"), this);
increasePageZoomAction->setData(ZOOM_PLUS_ACTION_Y); increasePageZoomAction->setData(ZOOM_PLUS_ACTION_Y);
@ -382,20 +390,20 @@ void MainWindowViewer::createActions()
connect(decreasePageZoomAction, &QAction::triggered, this, &MainWindowViewer::decreasePageZoomLevel); connect(decreasePageZoomAction, &QAction::triggered, this, &MainWindowViewer::decreasePageZoomLevel);
leftRotationAction = new QAction(tr("Rotate image to the left"), this); leftRotationAction = new QAction(tr("Rotate image to the left"), this);
leftRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateL.png")); leftRotationAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/rotateL")));
leftRotationAction->setData(LEFT_ROTATION_ACTION_Y); leftRotationAction->setData(LEFT_ROTATION_ACTION_Y);
leftRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(LEFT_ROTATION_ACTION_Y)); leftRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(LEFT_ROTATION_ACTION_Y));
connect(leftRotationAction, &QAction::triggered, viewer, &Viewer::rotateLeft); connect(leftRotationAction, &QAction::triggered, viewer, &Viewer::rotateLeft);
rightRotationAction = new QAction(tr("Rotate image to the right"), this); rightRotationAction = new QAction(tr("Rotate image to the right"), this);
rightRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateR.png")); rightRotationAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/rotateR")));
rightRotationAction->setData(RIGHT_ROTATION_ACTION_Y); rightRotationAction->setData(RIGHT_ROTATION_ACTION_Y);
rightRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RIGHT_ROTATION_ACTION_Y)); rightRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RIGHT_ROTATION_ACTION_Y));
connect(rightRotationAction, &QAction::triggered, viewer, &Viewer::rotateRight); connect(rightRotationAction, &QAction::triggered, viewer, &Viewer::rotateRight);
doublePageAction = new QAction(tr("Double page mode"), this); doublePageAction = new QAction(tr("Double page mode"), this);
doublePageAction->setToolTip(tr("Switch to double page mode")); doublePageAction->setToolTip(tr("Switch to double page mode"));
doublePageAction->setIcon(QIcon(":/images/viewer_toolbar/doublePage.png")); doublePageAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/doublePage")));
doublePageAction->setCheckable(true); doublePageAction->setCheckable(true);
doublePageAction->setChecked(Configuration::getConfiguration().getDoublePage()); doublePageAction->setChecked(Configuration::getConfiguration().getDoublePage());
doublePageAction->setData(DOUBLE_PAGE_ACTION_Y); doublePageAction->setData(DOUBLE_PAGE_ACTION_Y);
@ -405,7 +413,7 @@ void MainWindowViewer::createActions()
// inversed pictures mode // inversed pictures mode
doubleMangaPageAction = new QAction(tr("Double page manga mode"), this); doubleMangaPageAction = new QAction(tr("Double page manga mode"), this);
doubleMangaPageAction->setToolTip(tr("Reverse reading order in double page mode")); doubleMangaPageAction->setToolTip(tr("Reverse reading order in double page mode"));
doubleMangaPageAction->setIcon(QIcon(":/images/viewer_toolbar/doubleMangaPage.png")); doubleMangaPageAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/doubleMangaPage")));
doubleMangaPageAction->setCheckable(true); doubleMangaPageAction->setCheckable(true);
doubleMangaPageAction->setChecked(Configuration::getConfiguration().getDoubleMangaPage()); doubleMangaPageAction->setChecked(Configuration::getConfiguration().getDoubleMangaPage());
doubleMangaPageAction->setData(DOUBLE_MANGA_PAGE_ACTION_Y); doubleMangaPageAction->setData(DOUBLE_MANGA_PAGE_ACTION_Y);
@ -414,7 +422,7 @@ void MainWindowViewer::createActions()
connect(doubleMangaPageAction, &QAction::triggered, this, &MainWindowViewer::doubleMangaPageSwitch); connect(doubleMangaPageAction, &QAction::triggered, this, &MainWindowViewer::doubleMangaPageSwitch);
goToPageAction = new QAction(tr("Go To"), this); goToPageAction = new QAction(tr("Go To"), this);
goToPageAction->setIcon(QIcon(":/images/viewer_toolbar/goto.png")); goToPageAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/goto")));
goToPageAction->setToolTip(tr("Go to page ...")); goToPageAction->setToolTip(tr("Go to page ..."));
goToPageAction->setData(GO_TO_PAGE_ACTION_Y); goToPageAction->setData(GO_TO_PAGE_ACTION_Y);
goToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GO_TO_PAGE_ACTION_Y)); goToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GO_TO_PAGE_ACTION_Y));
@ -424,20 +432,20 @@ void MainWindowViewer::createActions()
optionsAction->setToolTip(tr("YACReader options")); optionsAction->setToolTip(tr("YACReader options"));
optionsAction->setData(OPTIONS_ACTION_Y); optionsAction->setData(OPTIONS_ACTION_Y);
optionsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPTIONS_ACTION_Y)); optionsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPTIONS_ACTION_Y));
optionsAction->setIcon(QIcon(":/images/viewer_toolbar/options.png")); optionsAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/options")));
connect(optionsAction, &QAction::triggered, optionsDialog, &OptionsDialog::show); connect(optionsAction, &QAction::triggered, optionsDialog, &OptionsDialog::show);
helpAboutAction = new QAction(tr("Help"), this); helpAboutAction = new QAction(tr("Help"), this);
helpAboutAction->setToolTip(tr("Help, About YACReader")); helpAboutAction->setToolTip(tr("Help, About YACReader"));
helpAboutAction->setIcon(QIcon(":/images/viewer_toolbar/help.png")); helpAboutAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/help")));
helpAboutAction->setData(HELP_ABOUT_ACTION_Y); helpAboutAction->setData(HELP_ABOUT_ACTION_Y);
helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_Y)); helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_Y));
connect(helpAboutAction, &QAction::triggered, had, &QWidget::show); connect(helpAboutAction, &QAction::triggered, had, &QWidget::show);
showMagnifyingGlassAction = new QAction(tr("Magnifying glass"), this); showMagnifyingGlassAction = new QAction(tr("Magnifying glass"), this);
showMagnifyingGlassAction->setToolTip(tr("Switch Magnifying glass")); showMagnifyingGlassAction->setToolTip(tr("Switch Magnifying glass"));
showMagnifyingGlassAction->setIcon(QIcon(":/images/viewer_toolbar/magnifyingGlass.png")); showMagnifyingGlassAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/magnifyingGlass")));
showMagnifyingGlassAction->setCheckable(true); showMagnifyingGlassAction->setCheckable(true);
showMagnifyingGlassAction->setData(SHOW_MAGNIFYING_GLASS_ACTION_Y); showMagnifyingGlassAction->setData(SHOW_MAGNIFYING_GLASS_ACTION_Y);
showMagnifyingGlassAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_MAGNIFYING_GLASS_ACTION_Y)); showMagnifyingGlassAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_MAGNIFYING_GLASS_ACTION_Y));
@ -445,7 +453,7 @@ void MainWindowViewer::createActions()
setBookmarkAction = new QAction(tr("Set bookmark"), this); setBookmarkAction = new QAction(tr("Set bookmark"), this);
setBookmarkAction->setToolTip(tr("Set a bookmark on the current page")); setBookmarkAction->setToolTip(tr("Set a bookmark on the current page"));
setBookmarkAction->setIcon(QIcon(":/images/viewer_toolbar/bookmark.png")); setBookmarkAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/bookmark")));
setBookmarkAction->setCheckable(true); setBookmarkAction->setCheckable(true);
setBookmarkAction->setData(SET_BOOKMARK_ACTION_Y); setBookmarkAction->setData(SET_BOOKMARK_ACTION_Y);
setBookmarkAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_BOOKMARK_ACTION_Y)); setBookmarkAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_BOOKMARK_ACTION_Y));
@ -455,39 +463,38 @@ void MainWindowViewer::createActions()
showBookmarksAction = new QAction(tr("Show bookmarks"), this); showBookmarksAction = new QAction(tr("Show bookmarks"), this);
showBookmarksAction->setToolTip(tr("Show the bookmarks of the current comic")); showBookmarksAction->setToolTip(tr("Show the bookmarks of the current comic"));
showBookmarksAction->setIcon(QIcon(":/images/viewer_toolbar/showBookmarks.png")); showBookmarksAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/showBookmarks")));
showBookmarksAction->setData(SHOW_BOOKMARKS_ACTION_Y); showBookmarksAction->setData(SHOW_BOOKMARKS_ACTION_Y);
showBookmarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_BOOKMARKS_ACTION_Y)); showBookmarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_BOOKMARKS_ACTION_Y));
connect(showBookmarksAction, &QAction::triggered, viewer->getBookmarksDialog(), &QWidget::show); connect(showBookmarksAction, &QAction::triggered, viewer->getBookmarksDialog(), &QWidget::show);
showShorcutsAction = new QAction(tr("Show keyboard shortcuts"), this); showShorcutsAction = new QAction(tr("Show keyboard shortcuts"), this);
showShorcutsAction->setIcon(QIcon(":/images/viewer_toolbar/shortcuts.png")); showShorcutsAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/shortcuts")));
showShorcutsAction->setData(SHOW_SHORCUTS_ACTION_Y); showShorcutsAction->setData(SHOW_SHORCUTS_ACTION_Y);
showShorcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_SHORCUTS_ACTION_Y)); showShorcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_SHORCUTS_ACTION_Y));
// connect(showShorcutsAction, SIGNAL(triggered()),shortcutsDialog,SLOT(show()));
connect(showShorcutsAction, &QAction::triggered, editShortcutsDialog, &QWidget::show); connect(showShorcutsAction, &QAction::triggered, editShortcutsDialog, &QWidget::show);
showInfoAction = new QAction(tr("Show Info"), this); showInfoAction = new QAction(tr("Show Info"), this);
showInfoAction->setIcon(QIcon(":/images/viewer_toolbar/info.png")); showInfoAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/info")));
showInfoAction->setData(SHOW_INFO_ACTION_Y); showInfoAction->setData(SHOW_INFO_ACTION_Y);
showInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_INFO_ACTION_Y)); showInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_INFO_ACTION_Y));
connect(showInfoAction, &QAction::triggered, viewer, &Viewer::informationSwitch); connect(showInfoAction, &QAction::triggered, viewer, &Viewer::informationSwitch);
closeAction = new QAction(tr("Close"), this); closeAction = new QAction(tr("Close"), this);
closeAction->setIcon(QIcon(":/images/viewer_toolbar/close.png")); closeAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/close")));
closeAction->setData(CLOSE_ACTION_Y); closeAction->setData(CLOSE_ACTION_Y);
closeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(CLOSE_ACTION_Y)); closeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(CLOSE_ACTION_Y));
connect(closeAction, &QAction::triggered, this, &QWidget::close); connect(closeAction, &QAction::triggered, this, &QWidget::close);
showDictionaryAction = new QAction(tr("Show Dictionary"), this); showDictionaryAction = new QAction(tr("Show Dictionary"), this);
showDictionaryAction->setIcon(QIcon(":/images/viewer_toolbar/translator.png")); showDictionaryAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/translator")));
// showDictionaryAction->setCheckable(true); // showDictionaryAction->setCheckable(true);
showDictionaryAction->setData(SHOW_DICTIONARY_ACTION_Y); showDictionaryAction->setData(SHOW_DICTIONARY_ACTION_Y);
showDictionaryAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_DICTIONARY_ACTION_Y)); showDictionaryAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_DICTIONARY_ACTION_Y));
connect(showDictionaryAction, &QAction::triggered, viewer, &Viewer::translatorSwitch); connect(showDictionaryAction, &QAction::triggered, viewer, &Viewer::translatorSwitch);
showFlowAction = new QAction(tr("Show go to flow"), this); showFlowAction = new QAction(tr("Show go to flow"), this);
showFlowAction->setIcon(QIcon(":/images/viewer_toolbar/flow.png")); showFlowAction->setIcon(QIcon(addExtensionToIconPath(":/images/viewer_toolbar/flow")));
showFlowAction->setData(SHOW_FLOW_ACTION_Y); showFlowAction->setData(SHOW_FLOW_ACTION_Y);
showFlowAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_FLOW_ACTION_Y)); showFlowAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_FLOW_ACTION_Y));
connect(showFlowAction, &QAction::triggered, viewer, &Viewer::goToFlowSwitch); connect(showFlowAction, &QAction::triggered, viewer, &Viewer::goToFlowSwitch);
@ -533,61 +540,72 @@ void MainWindowViewer::createToolBars()
refreshRecentFilesActionList(); refreshRecentFilesActionList();
auto tb = new QToolButton(); auto tb = new QToolButton();
tb->addAction(openAction); auto open = actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/open")), openAction);
tb->addAction(openLatestComicAction); tb->addAction(open);
tb->addAction(openFolderAction); tb->addAction(actionWithCustomIcon(QIcon(), openLatestComicAction));
tb->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/openFolder")), openFolderAction));
tb->addAction(recentmenu->menuAction()); tb->addAction(recentmenu->menuAction());
tb->setPopupMode(QToolButton::MenuButtonPopup); tb->setPopupMode(QToolButton::MenuButtonPopup);
tb->setDefaultAction(openAction); tb->setDefaultAction(open);
comicToolBar->addWidget(tb); comicToolBar->addWidget(tb);
#endif #endif
comicToolBar->addAction(saveImageAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/save")), saveImageAction));
comicToolBar->addAction(openComicOnTheLeftAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/openPrevious")), openComicOnTheLeftAction));
comicToolBar->addAction(openComicOnTheRightAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/openNext")), openComicOnTheRightAction));
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(goToPageOnTheLeftAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/previous")), goToPageOnTheLeftAction));
comicToolBar->addAction(goToPageOnTheRightAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/next")), goToPageOnTheRightAction));
comicToolBar->addAction(goToPageAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/goto")), goToPageAction));
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(adjustWidthAction); auto adjustToWidthTBAction = actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/toWidth")), adjustWidthAction);
comicToolBar->addAction(adjustHeightAction); comicToolBar->addAction(adjustToWidthTBAction);
auto adjustToHeightTBAction = actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/toHeight")), adjustHeightAction);
comicToolBar->addAction(adjustToHeightTBAction);
auto adjustToFullSizeTBAction = actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/full")), adjustToFullSizeAction);
comicToolBar->addAction(adjustToFullSizeAction); comicToolBar->addAction(adjustToFullSizeAction);
comicToolBar->addAction(fitToPageAction); auto fitToPageTBAction = actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/fitToPage")), fitToPageAction);
comicToolBar->addAction(fitToPageTBAction);
auto fitModes = new QActionGroup(this);
fitModes->addAction(adjustToWidthTBAction);
fitModes->addAction(adjustToHeightTBAction);
fitModes->addAction(adjustToFullSizeTBAction);
fitModes->addAction(fitToPageTBAction);
zoomSliderAction = new YACReaderSlider(this); zoomSliderAction = new YACReaderSlider(this);
zoomSliderAction->hide(); zoomSliderAction->hide();
comicToolBar->addAction(showZoomSliderlAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/zoom")), showZoomSliderlAction));
connect(showZoomSliderlAction, &QAction::triggered, this, &MainWindowViewer::toggleFitToWidthSlider); connect(showZoomSliderlAction, &QAction::triggered, this, &MainWindowViewer::toggleFitToWidthSlider);
connect(zoomSliderAction, &YACReaderSlider::zoomRatioChanged, viewer, &Viewer::updateZoomRatio); connect(zoomSliderAction, &YACReaderSlider::zoomRatioChanged, viewer, &Viewer::updateZoomRatio);
connect(viewer, &Viewer::zoomUpdated, zoomSliderAction, &YACReaderSlider::updateZoomRatio); connect(viewer, &Viewer::zoomUpdated, zoomSliderAction, &YACReaderSlider::updateZoomRatio);
comicToolBar->addAction(leftRotationAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/rotateL")), leftRotationAction));
comicToolBar->addAction(rightRotationAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/rotateR")), rightRotationAction));
comicToolBar->addAction(doublePageAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/doublePage")), doublePageAction));
comicToolBar->addAction(doubleMangaPageAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/doubleMangaPage")), doubleMangaPageAction));
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(showMagnifyingGlassAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/magnifyingGlass")), showMagnifyingGlassAction));
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(setBookmarkAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/bookmark")), setBookmarkAction));
comicToolBar->addAction(showBookmarksAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/showBookmarks")), showBookmarksAction));
comicToolBar->addSeparator(); comicToolBar->addSeparator();
comicToolBar->addAction(showDictionaryAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/translator")), showDictionaryAction));
comicToolBar->addAction(showFlowAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/flow")), showFlowAction));
comicToolBar->addAction(showInfoAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/info")), showInfoAction));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
comicToolBar->addStretch(); comicToolBar->addStretch();
@ -595,10 +613,9 @@ void MainWindowViewer::createToolBars()
comicToolBar->addWidget(new YACReaderToolBarStretch()); comicToolBar->addWidget(new YACReaderToolBarStretch());
#endif #endif
comicToolBar->addAction(showShorcutsAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/shortcuts")), showShorcutsAction));
comicToolBar->addAction(optionsAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/options")), optionsAction));
comicToolBar->addAction(helpAboutAction); comicToolBar->addAction(actionWithCustomIcon(QIcon(addExtensionToIconPathInToolbar(":/images/viewer_toolbar/help")), helpAboutAction));
// comicToolBar->addAction(closeAction);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
comicToolBar->setMovable(false); comicToolBar->setMovable(false);
@ -1156,7 +1173,7 @@ void MainWindowViewer::setUpShortcutsManagement()
QList<QAction *> allActions; QList<QAction *> allActions;
QList<QAction *> tmpList; QList<QAction *> tmpList;
editShortcutsDialog->addActionsGroup(tr("Comics"), QIcon(":/images/shortcuts_group_comics.png"), editShortcutsDialog->addActionsGroup(tr("Comics"), QIcon(":/images/shortcuts_group_comics.svg"),
tmpList = { openAction, tmpList = { openAction,
openLatestComicAction, openLatestComicAction,
openFolderAction, openFolderAction,
@ -1172,7 +1189,7 @@ void MainWindowViewer::setUpShortcutsManagement()
auto *const toggleToolbarsAction = addActionWithShortcut(tr("Hide/show toolbar"), TOGGLE_TOOL_BARS_ACTION_Y); auto *const toggleToolbarsAction = addActionWithShortcut(tr("Hide/show toolbar"), TOGGLE_TOOL_BARS_ACTION_Y);
connect(toggleToolbarsAction, &QAction::triggered, this, &MainWindowViewer::toggleToolBars); connect(toggleToolbarsAction, &QAction::triggered, this, &MainWindowViewer::toggleToolBars);
editShortcutsDialog->addActionsGroup(tr("General"), QIcon(":/images/shortcuts_group_general.png"), editShortcutsDialog->addActionsGroup(tr("General"), QIcon(":/images/shortcuts_group_general.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< optionsAction << optionsAction
<< helpAboutAction << helpAboutAction
@ -1206,7 +1223,7 @@ void MainWindowViewer::setUpShortcutsManagement()
mglassActions = { sizeUpMglassAction, sizeDownMglassAction, mglassActions = { sizeUpMglassAction, sizeDownMglassAction,
zoomInMglassAction, zoomOutMglassAction }; zoomInMglassAction, zoomOutMglassAction };
editShortcutsDialog->addActionsGroup(tr("Magnifiying glass"), QIcon(":/images/shortcuts_group_mglass.png"), editShortcutsDialog->addActionsGroup(tr("Magnifiying glass"), QIcon(":/images/shortcuts_group_mglass.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< showMagnifyingGlassAction << showMagnifyingGlassAction
<< mglassActions); << mglassActions);
@ -1217,7 +1234,7 @@ void MainWindowViewer::setUpShortcutsManagement()
CHANGE_FIT_ACTION_Y); CHANGE_FIT_ACTION_Y);
connect(toggleFitToScreenAction, &QAction::triggered, this, &MainWindowViewer::toggleWidthHeight); connect(toggleFitToScreenAction, &QAction::triggered, this, &MainWindowViewer::toggleWidthHeight);
editShortcutsDialog->addActionsGroup(tr("Page adjustement"), QIcon(":/images/shortcuts_group_page.png"), editShortcutsDialog->addActionsGroup(tr("Page adjustement"), QIcon(":/images/shortcuts_group_page.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< adjustHeightAction << adjustHeightAction
<< adjustWidthAction << adjustWidthAction
@ -1287,7 +1304,7 @@ void MainWindowViewer::setUpShortcutsManagement()
goToFirstPageAction, goToFirstPageAction,
goToLastPageAction }; goToLastPageAction };
editShortcutsDialog->addActionsGroup(tr("Reading"), QIcon(":/images/shortcuts_group_reading.png"), editShortcutsDialog->addActionsGroup(tr("Reading"), QIcon(":/images/shortcuts_group_reading.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< goToPageOnTheRightAction << goToPageOnTheRightAction
<< goToPageOnTheLeftAction << goToPageOnTheLeftAction

View File

@ -21,16 +21,16 @@
<file>../images/dropDownArrow.png</file> <file>../images/dropDownArrow.png</file>
<file>../images/translatorSearch.png</file> <file>../images/translatorSearch.png</file>
<file>../images/speaker.png</file> <file>../images/speaker.png</file>
<file>../images/clear_shortcut.png</file> <file>../images/clear_shortcut.svg</file>
<file>../images/accept_shortcut.png</file> <file>../images/accept_shortcut.svg</file>
<file>../images/shortcuts_group_comics.png</file> <file>../images/shortcuts_group_comics.svg</file>
<file>../images/shortcuts_group_folders.png</file> <file>../images/shortcuts_group_folders.svg</file>
<file>../images/shortcuts_group_general.png</file> <file>../images/shortcuts_group_general.svg</file>
<file>../images/shortcuts_group_libraries.png</file> <file>../images/shortcuts_group_libraries.svg</file>
<file>../images/shortcuts_group_mglass.png</file> <file>../images/shortcuts_group_mglass.svg</file>
<file>../images/shortcuts_group_page.png</file> <file>../images/shortcuts_group_page.svg</file>
<file>../images/shortcuts_group_reading.png</file> <file>../images/shortcuts_group_reading.svg</file>
<file>../images/shortcuts_group_visualization.png</file> <file>../images/shortcuts_group_visualization.svg</file>
<file>../images/custom_dialog/custom_close_button.svg</file> <file>../images/custom_dialog/custom_close_button.svg</file>
<file>../images/whats_new/whatsnew_header.svg</file> <file>../images/whats_new/whatsnew_header.svg</file>
</qresource> </qresource>

View File

@ -1,31 +1,58 @@
<RCC> <RCC>
<qresource prefix="/" > <qresource prefix="/" >
<file>../images/viewer_toolbar/bookmark.png</file> <file>../images/viewer_toolbar/bookmark.svg</file>
<file>../images/viewer_toolbar/close.png</file> <file>../images/viewer_toolbar/close.svg</file>
<file>../images/viewer_toolbar/doublePage.png</file> <file>../images/viewer_toolbar/doublePage.svg</file>
<file>../images/viewer_toolbar/doubleMangaPage.png</file> <file>../images/viewer_toolbar/doubleMangaPage.svg</file>
<file>../images/viewer_toolbar/fitToPage.png</file> <file>../images/viewer_toolbar/fitToPage.svg</file>
<file>../images/viewer_toolbar/flow.png</file> <file>../images/viewer_toolbar/flow.svg</file>
<file>../images/viewer_toolbar/full.png</file> <file>../images/viewer_toolbar/full.svg</file>
<file>../images/viewer_toolbar/goto.png</file> <file>../images/viewer_toolbar/goto.svg</file>
<file>../images/viewer_toolbar/help.png</file> <file>../images/viewer_toolbar/help.svg</file>
<file>../images/viewer_toolbar/info.png</file> <file>../images/viewer_toolbar/info.svg</file>
<file>../images/viewer_toolbar/magnifyingGlass.png</file> <file>../images/viewer_toolbar/magnifyingGlass.svg</file>
<file>../images/viewer_toolbar/next.png</file> <file>../images/viewer_toolbar/next.svg</file>
<file>../images/viewer_toolbar/open.png</file> <file>../images/viewer_toolbar/open.svg</file>
<file>../images/viewer_toolbar/openFolder.png</file> <file>../images/viewer_toolbar/openFolder.svg</file>
<file>../images/viewer_toolbar/openNext.png</file> <file>../images/viewer_toolbar/openNext.svg</file>
<file>../images/viewer_toolbar/openPrevious.png</file> <file>../images/viewer_toolbar/openPrevious.svg</file>
<file>../images/viewer_toolbar/options.png</file> <file>../images/viewer_toolbar/options.svg</file>
<file>../images/viewer_toolbar/previous.png</file> <file>../images/viewer_toolbar/previous.svg</file>
<file>../images/viewer_toolbar/rotateL.png</file> <file>../images/viewer_toolbar/rotateL.svg</file>
<file>../images/viewer_toolbar/rotateR.png</file> <file>../images/viewer_toolbar/rotateR.svg</file>
<file>../images/viewer_toolbar/save.png</file> <file>../images/viewer_toolbar/save.svg</file>
<file>../images/viewer_toolbar/shortcuts.png</file> <file>../images/viewer_toolbar/shortcuts.svg</file>
<file>../images/viewer_toolbar/showBookmarks.png</file> <file>../images/viewer_toolbar/showBookmarks.svg</file>
<file>../images/viewer_toolbar/toHeight.png</file> <file>../images/viewer_toolbar/toHeight.svg</file>
<file>../images/viewer_toolbar/toWidth.png</file> <file>../images/viewer_toolbar/toWidth.svg</file>
<file>../images/viewer_toolbar/translator.png</file> <file>../images/viewer_toolbar/translator.svg</file>
<file>../images/viewer_toolbar/zoom.png</file> <file>../images/viewer_toolbar/zoom.svg</file>
<file>../images/viewer_toolbar/bookmark_18x18.svg</file>
<file>../images/viewer_toolbar/close_18x18.svg</file>
<file>../images/viewer_toolbar/doublePage_18x18.svg</file>
<file>../images/viewer_toolbar/doubleMangaPage_18x18.svg</file>
<file>../images/viewer_toolbar/fitToPage_18x18.svg</file>
<file>../images/viewer_toolbar/flow_18x18.svg</file>
<file>../images/viewer_toolbar/full_18x18.svg</file>
<file>../images/viewer_toolbar/goto_18x18.svg</file>
<file>../images/viewer_toolbar/help_18x18.svg</file>
<file>../images/viewer_toolbar/info_18x18.svg</file>
<file>../images/viewer_toolbar/magnifyingGlass_18x18.svg</file>
<file>../images/viewer_toolbar/next_18x18.svg</file>
<file>../images/viewer_toolbar/open_18x18.svg</file>
<file>../images/viewer_toolbar/openFolder_18x18.svg</file>
<file>../images/viewer_toolbar/openNext_18x18.svg</file>
<file>../images/viewer_toolbar/openPrevious_18x18.svg</file>
<file>../images/viewer_toolbar/options_18x18.svg</file>
<file>../images/viewer_toolbar/previous_18x18.svg</file>
<file>../images/viewer_toolbar/rotateL_18x18.svg</file>
<file>../images/viewer_toolbar/rotateR_18x18.svg</file>
<file>../images/viewer_toolbar/save_18x18.svg</file>
<file>../images/viewer_toolbar/shortcuts_18x18.svg</file>
<file>../images/viewer_toolbar/showBookmarks_18x18.svg</file>
<file>../images/viewer_toolbar/toHeight_18x18.svg</file>
<file>../images/viewer_toolbar/toWidth_18x18.svg</file>
<file>../images/viewer_toolbar/translator_18x18.svg</file>
<file>../images/viewer_toolbar/zoom_18x18.svg</file>
</qresource> </qresource>
</RCC> </RCC>

View File

@ -1,7 +1,7 @@
<RCC> <RCC>
<qresource prefix="/"> <qresource prefix="/">
<file>../images/accept_shortcut.png</file> <file>../images/accept_shortcut.svg</file>
<file>../images/clear_shortcut.png</file> <file>../images/clear_shortcut.svg</file>
<file>../images/comic_vine/downArrow.png</file> <file>../images/comic_vine/downArrow.png</file>
<file>../images/comic_vine/nextPage.png</file> <file>../images/comic_vine/nextPage.png</file>
<file>../images/comic_vine/previousPage.png</file> <file>../images/comic_vine/previousPage.png</file>
@ -92,14 +92,14 @@
<file>../images/readRibbon.png</file> <file>../images/readRibbon.png</file>
<file>../images/searching_icon.png</file> <file>../images/searching_icon.png</file>
<file>../images/serverConfigBackground.png</file> <file>../images/serverConfigBackground.png</file>
<file>../images/shortcuts_group_comics.png</file> <file>../images/shortcuts_group_comics.svg</file>
<file>../images/shortcuts_group_folders.png</file> <file>../images/shortcuts_group_folders.svg</file>
<file>../images/shortcuts_group_general.png</file> <file>../images/shortcuts_group_general.svg</file>
<file>../images/shortcuts_group_libraries.png</file> <file>../images/shortcuts_group_libraries.svg</file>
<file>../images/shortcuts_group_mglass.png</file> <file>../images/shortcuts_group_mglass.svg</file>
<file>../images/shortcuts_group_page.png</file> <file>../images/shortcuts_group_page.svg</file>
<file>../images/shortcuts_group_reading.png</file> <file>../images/shortcuts_group_reading.svg</file>
<file>../images/shortcuts_group_visualization.png</file> <file>../images/shortcuts_group_visualization.svg</file>
<file>../images/shownCovers.png</file> <file>../images/shownCovers.png</file>
<file>../images/sidebar/branch-closed.png</file> <file>../images/sidebar/branch-closed.png</file>
<file>../images/sidebar/branch-open.png</file> <file>../images/sidebar/branch-open.png</file>

View File

@ -361,7 +361,7 @@ void LibraryWindow::setUpShortcutsManagement()
QList<QAction *> allActions; QList<QAction *> allActions;
QList<QAction *> tmpList; QList<QAction *> tmpList;
editShortcutsDialog->addActionsGroup("Comics", QIcon(":/images/shortcuts_group_comics.png"), editShortcutsDialog->addActionsGroup("Comics", QIcon(":/images/shortcuts_group_comics.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< openComicAction << openComicAction
<< saveCoversToAction << saveCoversToAction
@ -379,7 +379,7 @@ void LibraryWindow::setUpShortcutsManagement()
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("Folders", QIcon(":/images/shortcuts_group_folders.png"), editShortcutsDialog->addActionsGroup("Folders", QIcon(":/images/shortcuts_group_folders.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< addFolderAction << addFolderAction
<< deleteFolderAction << deleteFolderAction
@ -396,7 +396,7 @@ void LibraryWindow::setUpShortcutsManagement()
<< updateCurrentFolderAction); << updateCurrentFolderAction);
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("Lists", QIcon(":/images/shortcuts_group_folders.png"), // TODO change icon editShortcutsDialog->addActionsGroup("Lists", QIcon(":/images/shortcuts_group_folders.svg"), // TODO change icon
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< addReadingListAction << addReadingListAction
<< deleteReadingListAction << deleteReadingListAction
@ -404,7 +404,7 @@ void LibraryWindow::setUpShortcutsManagement()
<< renameListAction); << renameListAction);
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("General", QIcon(":/images/shortcuts_group_general.png"), editShortcutsDialog->addActionsGroup("General", QIcon(":/images/shortcuts_group_general.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< backAction << backAction
<< forwardAction << forwardAction
@ -418,7 +418,7 @@ void LibraryWindow::setUpShortcutsManagement()
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("Libraries", QIcon(":/images/shortcuts_group_libraries.png"), editShortcutsDialog->addActionsGroup("Libraries", QIcon(":/images/shortcuts_group_libraries.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< createLibraryAction << createLibraryAction
<< openLibraryAction << openLibraryAction
@ -433,7 +433,7 @@ void LibraryWindow::setUpShortcutsManagement()
allActions << tmpList; allActions << tmpList;
editShortcutsDialog->addActionsGroup("Visualization", QIcon(":/images/shortcuts_group_visualization.png"), editShortcutsDialog->addActionsGroup("Visualization", QIcon(":/images/shortcuts_group_visualization.svg"),
tmpList = QList<QAction *>() tmpList = QList<QAction *>()
<< showHideMarksAction << showHideMarksAction
#ifndef Q_OS_MAC #ifndef Q_OS_MAC

BIN
images/accept_shortcut.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

BIN
images/clear_shortcut.svg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 340 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

View File

@ -59,20 +59,17 @@ KeySequenceLineEdit::KeySequenceLineEdit(QWidget *parent)
// keys[0] = keys[1] = keys[2] = keys[3] = 0; // keys[0] = keys[1] = keys[2] = keys[3] = 0;
setAlignment(Qt::AlignRight); setAlignment(Qt::AlignRight);
QPixmap clearPixmap(":/images/clear_shortcut.png");
QPixmap acceptPixmap(":/images/accept_shortcut.png");
clearButton = new QToolButton(this); clearButton = new QToolButton(this);
acceptButton = new QToolButton(this); acceptButton = new QToolButton(this);
QString buttonsStyle = "QToolButton { border: none; padding: 0px; }"; QString buttonsStyle = "QToolButton { border: none; padding: 0px; }";
clearButton->setIcon(QIcon(clearPixmap)); clearButton->setIcon(QIcon(":/images/clear_shortcut.svg"));
clearButton->setIconSize(clearPixmap.size()); clearButton->setIconSize(QSize(15, 15));
clearButton->setCursor(Qt::ArrowCursor); clearButton->setCursor(Qt::ArrowCursor);
clearButton->setStyleSheet(buttonsStyle); clearButton->setStyleSheet(buttonsStyle);
acceptButton->setIcon(QIcon(acceptPixmap)); acceptButton->setIcon(QIcon(":/images/accept_shortcut.svg"));
acceptButton->setIconSize(acceptPixmap.size()); acceptButton->setIconSize(QSize(15, 15));
acceptButton->setCursor(Qt::ArrowCursor); acceptButton->setCursor(Qt::ArrowCursor);
acceptButton->setStyleSheet(buttonsStyle); acceptButton->setStyleSheet(buttonsStyle);