Commit 22d40f4d authored by Alessandro Portale's avatar Alessandro Portale
Browse files

Utils: Unify the different Bookmark icons



The variant in Bookmarks was left aligned, which is obsolete due to the
textmark overview tooltip. Bookmarks and Help now use the same icon which
is in Utils.

Change-Id: I0f7899de2f7a8803aa8493659d2991ac13739144
Reviewed-by: David Schulz's avatarDavid Schulz <david.schulz@qt.io>
parent 60e4cec4
......@@ -150,5 +150,7 @@
<file>images/iconoverlay_warning@2x.png</file>
<file>images/iconoverlay_warning_background.png</file>
<file>images/iconoverlay_warning_background@2x.png</file>
<file>images/bookmark.png</file>
<file>images/bookmark@2x.png</file>
</qresource>
</RCC>
......@@ -57,6 +57,12 @@ const Icon BROKEN({
const Icon ERROR({
{QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal},
{QLatin1String(":/utils/images/error.png"), Theme::IconsErrorColor}}, Icon::Tint);
const Icon BOOKMARK({
{QLatin1String(":/utils/images/bookmark.png"), Theme::PanelTextColorMid}}, Icon::Tint);
const Icon BOOKMARK_TOOLBAR({
{QLatin1String(":/utils/images/bookmark.png"), Theme::IconsBaseColor}});
const Icon BOOKMARK_TEXTEDITOR({
{QLatin1String(":/utils/images/bookmark.png"), Theme::Bookmarks_TextMarkColor}}, Icon::Tint);
const Icon NEWFILE(
QLatin1String(":/utils/images/filenew.png"));
......
......@@ -45,6 +45,9 @@ QTCREATOR_UTILS_EXPORT extern const Icon OK;
QTCREATOR_UTILS_EXPORT extern const Icon NOTLOADED;
QTCREATOR_UTILS_EXPORT extern const Icon BROKEN;
QTCREATOR_UTILS_EXPORT extern const Icon ERROR;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon BOOKMARK_TEXTEDITOR;
QTCREATOR_UTILS_EXPORT extern const Icon NEWFILE;
QTCREATOR_UTILS_EXPORT extern const Icon OPENFILE;
......
......@@ -42,6 +42,7 @@
#include <utils/checkablemessagebox.h>
#include <utils/theme/theme.h>
#include <utils/dropsupport.h>
#include <utils/utilsicons.h>
#include <QAction>
#include <QContextMenuEvent>
......@@ -319,8 +320,7 @@ void BookmarkView::gotoBookmark(const QModelIndex &index)
////
BookmarkManager::BookmarkManager() :
m_bookmarkIcon(Utils::Icon({{QLatin1String(":/bookmarks/images/bookmark.png"),
Theme::Bookmarks_TextMarkColor}}, Icon::Tint).pixmap()),
m_bookmarkIcon(Utils::Icons::BOOKMARK_TEXTEDITOR.pixmap()),
m_selectionModel(new QItemSelectionModel(this, this))
{
connect(ICore::instance(), &ICore::contextChanged,
......
......@@ -8,5 +8,3 @@ HEADERS += bookmarksplugin.h \
SOURCES += bookmarksplugin.cpp \
bookmark.cpp \
bookmarkmanager.cpp
RESOURCES += bookmarks.qrc
<RCC>
<qresource prefix="/bookmarks" >
<file>images/bookmark.png</file>
<file>images/bookmark@2x.png</file>
</qresource>
</RCC>
......@@ -4,8 +4,6 @@
<file>images/book.png</file>
<file>images/home.png</file>
<file>images/home@2x.png</file>
<file>images/bookmark.png</file>
<file>images/bookmark@2x.png</file>
<file>images/category_help.png</file>
<file>images/mode_help.png</file>
<file>images/mode_help@2x.png</file>
......
......@@ -34,6 +34,7 @@
#include <coreplugin/icore.h>
#include <coreplugin/helpmanager.h>
#include <utils/algorithm.h>
#include <utils/utilsicons.h>
#include <QIcon>
#include <QSqlDatabase>
......@@ -54,7 +55,7 @@ HelpIndexFilter::HelpIndexFilter()
setIncludedByDefault(false);
setShortcutString(QString(QLatin1Char('?')));
m_icon = Icons::BOOKMARK.icon();
m_icon = Utils::Icons::BOOKMARK.icon();
connect(HelpManager::instance(), &HelpManager::setupFinished,
this, &HelpIndexFilter::invalidateCache);
connect(HelpManager::instance(), &HelpManager::documentationChanged,
......
......@@ -180,7 +180,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
button->setPopupMode(QToolButton::DelayedPopup);
layout->addWidget(button);
m_addBookmarkAction = new QAction(Icons::BOOKMARK_TOOLBAR.icon(), tr("Add Bookmark"), this);
m_addBookmarkAction = new QAction(Utils::Icons::BOOKMARK_TOOLBAR.icon(), tr("Add Bookmark"), this);
cmd = Core::ActionManager::registerAction(m_addBookmarkAction, Constants::HELP_ADDBOOKMARK, context);
cmd->setDefaultKeySequence(QKeySequence(Core::UseMacShortcuts ? tr("Meta+M") : tr("Ctrl+M")));
connect(m_addBookmarkAction, &QAction::triggered, this, &HelpWidget::addBookmark);
......
......@@ -24,10 +24,11 @@
****************************************************************************/
#include "xbelsupport.h"
#include "helpicons.h"
#include <bookmarkmanager.h>
#include <utils/utilsicons.h>
#include <QCoreApplication>
using namespace Help::Internal;
......@@ -97,7 +98,7 @@ XbelReader::XbelReader(BookmarkModel *tree, BookmarkModel *list)
, treeModel(tree)
, listModel(list)
{
bookmarkIcon = Icons::BOOKMARK.icon();
bookmarkIcon = Utils::Icons::BOOKMARK.icon();
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
}
......
......@@ -24,7 +24,6 @@
****************************************************************************/
#include "bookmarkmanager.h"
#include "helpicons.h"
#include <localhelpmanager.h>
......@@ -32,6 +31,7 @@
#include <utils/fancylineedit.h>
#include <utils/styledbar.h>
#include <utils/utilsicons.h>
#include <QMenu>
#include <QIcon>
......@@ -566,7 +566,7 @@ Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
BookmarkManager::BookmarkManager()
: m_folderIcon(QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon))
, m_bookmarkIcon(Help::Icons::BOOKMARK.icon())
, m_bookmarkIcon(Utils::Icons::BOOKMARK.icon())
, treeModel(new BookmarkModel(0, 1, this))
, listModel(new BookmarkModel(0, 1, this))
{
......
......@@ -30,10 +30,6 @@
namespace Help {
namespace Icons {
const Utils::Icon BOOKMARK({
{QLatin1String(":/help/images/bookmark.png"), Utils::Theme::PanelTextColorMid}}, Utils::Icon::Tint);
const Utils::Icon BOOKMARK_TOOLBAR({
{QLatin1String(":/help/images/bookmark.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon HOME_TOOLBAR({
{QLatin1String(":/help/images/home.png"), Utils::Theme::IconsBaseColor}});
const Utils::Icon MODE_HELP_CLASSIC(
......
......@@ -3001,7 +3001,7 @@
transform="translate(336,208)" />
</g>
<g
id="src/plugins/help/images/bookmark">
id="src/libs/utils/images/bookmark">
<rect
id="rect6782-96"
height="16"
......@@ -3051,25 +3051,6 @@
cy="576"
r="6" />
</g>
<g
id="src/plugins/bookmarks/images/bookmark">
<rect
style="display:inline;fill:#ffffff;fill-opacity:1"
x="1016"
y="568"
width="16"
height="16"
id="rect6782-96-0" />
<use
transform="translate(61,0)"
height="100%"
width="100%"
id="use4979"
xlink:href="#bookmarkribbon"
y="0"
x="0"
style="display:inline" />
</g>
<g
style="display:inline"
id="src/plugins/debugger/images/qml/app-on-top"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment