mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
New icons for 'new-tab' and 'tab'
Also added icon to 'Switch to tab' text in locationbar completer popup.
This commit is contained in:
parent
454d0d47dd
commit
889e2743f5
@ -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"));
|
||||
|
@ -19,7 +19,7 @@
|
||||
<file>icons/locationbar/unknownpage.png</file>
|
||||
<file>icons/menu/history.png</file>
|
||||
<file>icons/menu/history_entry.png</file>
|
||||
<file>icons/menu/popup.png</file>
|
||||
<file>icons/menu/new-tab.png</file>
|
||||
<file>icons/menu/qt.png</file>
|
||||
<file>icons/menu/rss.png</file>
|
||||
<file>icons/other/about.png</file>
|
||||
@ -69,5 +69,6 @@
|
||||
<file>icons/sites/yahoo.png</file>
|
||||
<file>icons/sites/youtube.png</file>
|
||||
<file>icons/preferences/preferences-desktop-keyboard-shortcuts.png</file>
|
||||
<file>icons/menu/tab.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
BIN
src/lib/data/icons/menu/new-tab.png
Normal file
BIN
src/lib/data/icons/menu/new-tab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 460 B |
Binary file not shown.
Before Width: | Height: | Size: 580 B |
BIN
src/lib/data/icons/menu/tab.png
Normal file
BIN
src/lib/data/icons/menu/tab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 328 B |
@ -112,8 +112,14 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
|
||||
painter->setFont(opt.font);
|
||||
TabPosition pos = index.data(LocationCompleterModel::TabPositionRole).value<TabPosition>();
|
||||
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);
|
||||
|
@ -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<WebTab*>(m_tabWidget->widget(m_clickedTab));
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user