diff --git a/src/lib/app/qupzilla.cpp b/src/lib/app/qupzilla.cpp index 5ce56cbb2..b4cc05f75 100644 --- a/src/lib/app/qupzilla.cpp +++ b/src/lib/app/qupzilla.cpp @@ -317,7 +317,7 @@ void QupZilla::setupMenu() *************/ m_menuFile = new QMenu(tr("&File")); m_menuFile->addAction(QIcon::fromTheme("window-new"), tr("&New Window"), this, SLOT(newWindow()))->setShortcut(QKeySequence("Ctrl+N")); - m_menuFile->addAction(QIcon(":/icons/menu/popup.png"), tr("New Tab"), this, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T")); + m_menuFile->addAction(QIcon(":/icons/menu/new-tab.png"), tr("New Tab"), this, SLOT(addTab()))->setShortcut(QKeySequence("Ctrl+T")); m_menuFile->addAction(QIcon::fromTheme("document-open-remote"), tr("Open Location"), this, SLOT(openLocation()))->setShortcut(QKeySequence("Ctrl+L")); m_menuFile->addAction(QIcon::fromTheme("document-open"), tr("Open &File"), this, SLOT(openFile()))->setShortcut(QKeySequence("Ctrl+O")); m_menuFile->addAction(tr("Close Tab"), m_tabWidget, SLOT(closeTab()))->setShortcut(QKeySequence("Ctrl+W")); diff --git a/src/lib/data/icons.qrc b/src/lib/data/icons.qrc index e27dec369..38f376f65 100644 --- a/src/lib/data/icons.qrc +++ b/src/lib/data/icons.qrc @@ -19,7 +19,7 @@ icons/locationbar/unknownpage.png icons/menu/history.png icons/menu/history_entry.png - icons/menu/popup.png + icons/menu/new-tab.png icons/menu/qt.png icons/menu/rss.png icons/other/about.png @@ -69,5 +69,6 @@ icons/sites/yahoo.png icons/sites/youtube.png icons/preferences/preferences-desktop-keyboard-shortcuts.png + icons/menu/tab.png diff --git a/src/lib/data/icons/menu/new-tab.png b/src/lib/data/icons/menu/new-tab.png new file mode 100644 index 000000000..d6c5f64e4 Binary files /dev/null and b/src/lib/data/icons/menu/new-tab.png differ diff --git a/src/lib/data/icons/menu/popup.png b/src/lib/data/icons/menu/popup.png deleted file mode 100644 index 8e103fc76..000000000 Binary files a/src/lib/data/icons/menu/popup.png and /dev/null differ diff --git a/src/lib/data/icons/menu/tab.png b/src/lib/data/icons/menu/tab.png new file mode 100644 index 000000000..d49627c9e Binary files /dev/null and b/src/lib/data/icons/menu/tab.png differ diff --git a/src/lib/navigation/completer/locationcompleterdelegate.cpp b/src/lib/navigation/completer/locationcompleterdelegate.cpp index a92b2109d..70a889d72 100644 --- a/src/lib/navigation/completer/locationcompleterdelegate.cpp +++ b/src/lib/navigation/completer/locationcompleterdelegate.cpp @@ -112,8 +112,14 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI painter->setFont(opt.font); TabPosition pos = index.data(LocationCompleterModel::TabPositionRole).value(); if(m_drawSwitchToTab && pos.windowIndex != -1) { - // TODO: select and paint a nice icon to give better feedback to the user. - drawTextLine(linkRect, tr("Switch to tab"), painter, style, opt, colorLinkRole); + const QIcon tabIcon = QIcon(":icons/menu/tab.png"); + QRect iconRect(linkRect); + iconRect.setWidth(m_padding + 16 + m_padding); + tabIcon.paint(painter, iconRect); + + QRect textRect(linkRect); + textRect.setX(textRect.x() + m_padding + 16 + m_padding); + drawTextLine(textRect, tr("Switch to tab"), painter, style, opt, colorLinkRole); } else { drawHighlightedTextLine(linkRect, link, searchText, painter, style, opt, colorLinkRole); diff --git a/src/lib/webview/tabbar.cpp b/src/lib/webview/tabbar.cpp index 0f383e59a..264f04800 100644 --- a/src/lib/webview/tabbar.cpp +++ b/src/lib/webview/tabbar.cpp @@ -120,7 +120,7 @@ void TabBar::contextMenuRequested(const QPoint &position) m_clickedTab = index; QMenu menu; - menu.addAction(QIcon(":/icons/menu/popup.png"), tr("&New tab"), p_QupZilla, SLOT(addTab())); + menu.addAction(QIcon(":/icons/menu/new-tab.png"), tr("&New tab"), p_QupZilla, SLOT(addTab())); menu.addSeparator(); if (index != -1) { WebTab* webTab = qobject_cast(m_tabWidget->widget(m_clickedTab)); diff --git a/src/lib/webview/webview.cpp b/src/lib/webview/webview.cpp index 24e1a2904..a0cfa10c4 100644 --- a/src/lib/webview/webview.cpp +++ b/src/lib/webview/webview.cpp @@ -803,7 +803,7 @@ void WebView::createPageContextMenu(QMenu* menu, const QPoint &pos) m_clickedFrame = frameAtPos; QMenu* frameMenu = new QMenu(tr("This frame")); frameMenu->addAction(tr("Show &only this frame"), this, SLOT(loadClickedFrame())); - frameMenu->addAction(QIcon(":/icons/menu/popup.png"), tr("Show this frame in new &tab"), this, SLOT(loadClickedFrameInNewTab())); + frameMenu->addAction(QIcon(":/icons/menu/new-tab.png"), tr("Show this frame in new &tab"), this, SLOT(loadClickedFrameInNewTab())); frameMenu->addSeparator(); frameMenu->addAction(qIconProvider->standardIcon(QStyle::SP_BrowserReload), tr("&Reload"), this, SLOT(reloadClickedFrame())); frameMenu->addAction(QIcon::fromTheme("document-print"), tr("Print frame"), this, SLOT(printClickedFrame())); @@ -844,7 +844,7 @@ void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTes } menu->addSeparator(); - menu->addAction(QIcon(":/icons/menu/popup.png"), tr("Open link in new &tab"), this, SLOT(userDefinedOpenUrlInNewTab()))->setData(hitTest.linkUrl()); + menu->addAction(QIcon(":/icons/menu/new-tab.png"), tr("Open link in new &tab"), this, SLOT(userDefinedOpenUrlInNewTab()))->setData(hitTest.linkUrl()); menu->addAction(QIcon::fromTheme("window-new"), tr("Open link in new &window"), this, SLOT(openUrlInNewWindow()))->setData(hitTest.linkUrl()); menu->addSeparator(); menu->addAction(qIconProvider->fromTheme("user-bookmarks"), tr("B&ookmark link"), this, SLOT(bookmarkLink()))->setData(hitTest.linkUrl());