aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/utils/images/toggleprogressdetails.pngbin0 -> 167 bytes
-rw-r--r--src/libs/utils/images/toggleprogressdetails@2x.pngbin0 -> 216 bytes
-rw-r--r--src/libs/utils/utils.qrc2
-rw-r--r--src/libs/utils/utilsicons.cpp2
-rw-r--r--src/libs/utils/utilsicons.h1
-rw-r--r--src/plugins/coreplugin/progressmanager/progressmanager.cpp35
-rw-r--r--src/plugins/coreplugin/progressmanager/progressmanager_p.h9
-rw-r--r--src/tools/icons/qtcreatoricons.svg41
8 files changed, 48 insertions, 42 deletions
diff --git a/src/libs/utils/images/toggleprogressdetails.png b/src/libs/utils/images/toggleprogressdetails.png
new file mode 100644
index 0000000000..b2353cd9d0
--- /dev/null
+++ b/src/libs/utils/images/toggleprogressdetails.png
Binary files differ
diff --git a/src/libs/utils/images/toggleprogressdetails@2x.png b/src/libs/utils/images/toggleprogressdetails@2x.png
new file mode 100644
index 0000000000..28a212491e
--- /dev/null
+++ b/src/libs/utils/images/toggleprogressdetails@2x.png
Binary files differ
diff --git a/src/libs/utils/utils.qrc b/src/libs/utils/utils.qrc
index dc576ca806..9aa2fbb976 100644
--- a/src/libs/utils/utils.qrc
+++ b/src/libs/utils/utils.qrc
@@ -219,6 +219,8 @@
<file>images/settings@2x.png</file>
<file>images/sort_alphabetically.png</file>
<file>images/sort_alphabetically@2x.png</file>
+ <file>images/toggleprogressdetails.png</file>
+ <file>images/toggleprogressdetails@2x.png</file>
</qresource>
<qresource prefix="/codemodel">
<file>images/enum.png</file>
diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp
index fe040c63d5..5afd3cc56a 100644
--- a/src/libs/utils/utilsicons.cpp
+++ b/src/libs/utils/utilsicons.cpp
@@ -188,6 +188,8 @@ const Icon LINK_TOOLBAR({
{QLatin1String(":/utils/images/linkicon.png"), Theme::IconsBaseColor}});
const Icon SORT_ALPHABETICALLY_TOOLBAR({
{QLatin1String(":/utils/images/sort_alphabetically.png"), Theme::IconsBaseColor}});
+const Icon TOGGLE_PROGRESSDETAILS_TOOLBAR({
+ {QLatin1String(":/utils/images/toggleprogressdetails.png"), Theme::IconsBaseColor}});
const Icon WARNING({
{QLatin1String(":/utils/images/warningfill.png"), Theme::BackgroundColorNormal},
diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h
index 8cf7b21048..ca8ad69ff7 100644
--- a/src/libs/utils/utilsicons.h
+++ b/src/libs/utils/utilsicons.h
@@ -109,6 +109,7 @@ QTCREATOR_UTILS_EXPORT extern const Icon FILTER;
QTCREATOR_UTILS_EXPORT extern const Icon LINK;
QTCREATOR_UTILS_EXPORT extern const Icon LINK_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon SORT_ALPHABETICALLY_TOOLBAR;
+QTCREATOR_UTILS_EXPORT extern const Icon TOGGLE_PROGRESSDETAILS_TOOLBAR;
QTCREATOR_UTILS_EXPORT extern const Icon INFO;
QTCREATOR_UTILS_EXPORT extern const Icon INFO_TOOLBAR;
diff --git a/src/plugins/coreplugin/progressmanager/progressmanager.cpp b/src/plugins/coreplugin/progressmanager/progressmanager.cpp
index 318f84163c..bbf0f0b820 100644
--- a/src/plugins/coreplugin/progressmanager/progressmanager.cpp
+++ b/src/plugins/coreplugin/progressmanager/progressmanager.cpp
@@ -39,6 +39,7 @@
#include <utils/qtcassert.h>
#include <utils/stylehelper.h>
#include <utils/theme/theme.h>
+#include <utils/utilsicons.h>
#include <QAction>
#include <QEvent>
@@ -319,7 +320,7 @@ void ProgressManagerPrivate::init()
m_summaryProgressBar->setCancelEnabled(false);
m_summaryProgressLayout->addWidget(m_summaryProgressBar);
layout->addWidget(m_summaryProgressWidget);
- auto toggleButton = new ToggleButton(m_statusBarWidget);
+ auto toggleButton = new QToolButton(m_statusBarWidget);
layout->addWidget(toggleButton);
m_statusBarWidget->installEventFilter(this);
StatusBarManager::addStatusBarWidget(m_statusBarWidget, StatusBarManager::RightCorner);
@@ -327,10 +328,7 @@ void ProgressManagerPrivate::init()
QAction *toggleProgressView = new QAction(tr("Toggle Progress Details"), this);
toggleProgressView->setCheckable(true);
toggleProgressView->setChecked(m_progressViewPinned);
- // we have to set an transparent icon to prevent the tool button to show text
- QPixmap p(1, 1);
- p.fill(Qt::transparent);
- toggleProgressView->setIcon(QIcon(p));
+ toggleProgressView->setIcon(Utils::Icons::TOGGLE_PROGRESSDETAILS_TOOLBAR.icon());
Command *cmd = ActionManager::registerAction(toggleProgressView,
"QtCreator.ToggleProgressDetails");
@@ -712,33 +710,6 @@ void ProgressManagerPrivate::progressDetailsToggled(bool checked)
settings->endGroup();
}
-ToggleButton::ToggleButton(QWidget *parent)
- : QToolButton(parent)
-{
- setToolButtonStyle(Qt::ToolButtonIconOnly);
- if (creatorTheme()->flag(Theme::FlatToolBars)) {
- QPalette p = palette();
- p.setBrush(QPalette::Base, creatorTheme()->color(Theme::ToggleButtonBackgroundColor));
- setPalette(p);
- }
-}
-
-QSize ToggleButton::sizeHint() const
-{
- return QSize(13, 12); // Uneven width, because the arrow's width is also uneven.
-}
-
-void ToggleButton::paintEvent(QPaintEvent *event)
-{
- QToolButton::paintEvent(event);
- QPainter p(this);
- QStyleOption arrowOpt;
- arrowOpt.initFrom(this);
- arrowOpt.rect.adjust(2, 0, -1, -2);
- StyleHelper::drawArrow(QStyle::PE_IndicatorArrowUp, &p, &arrowOpt);
-}
-
-
ProgressManager::ProgressManager() = default;
ProgressManager::~ProgressManager() = default;
diff --git a/src/plugins/coreplugin/progressmanager/progressmanager_p.h b/src/plugins/coreplugin/progressmanager/progressmanager_p.h
index c3509c1ce4..4eabe50204 100644
--- a/src/plugins/coreplugin/progressmanager/progressmanager_p.h
+++ b/src/plugins/coreplugin/progressmanager/progressmanager_p.h
@@ -112,14 +112,5 @@ private:
bool m_hovered = false;
};
-class ToggleButton : public QToolButton
-{
- Q_OBJECT
-public:
- ToggleButton(QWidget *parent);
- QSize sizeHint() const override;
- void paintEvent(QPaintEvent *event) override;
-};
-
} // namespace Internal
} // namespace Core
diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg
index f9abb04b4a..cb6e4836af 100644
--- a/src/tools/icons/qtcreatoricons.svg
+++ b/src/tools/icons/qtcreatoricons.svg
@@ -3607,6 +3607,45 @@
width="100%"
height="100%" />
</g>
+ <g
+ style="display:inline"
+ transform="translate(160)"
+ id="src/libs/utils/images/toggleprogressdetails">
+ <use
+ style="display:inline"
+ transform="translate(1740,132)"
+ height="100%"
+ width="100%"
+ id="use4105-8-8"
+ xlink:href="#backgroundRect"
+ y="0"
+ x="0" />
+ <rect
+ style="display:inline;fill:#707070"
+ id="rect2566"
+ width="8"
+ height="2"
+ x="1726"
+ y="577" />
+ <rect
+ style="display:inline;fill:none;stroke:#000000"
+ id="rect2564"
+ width="13"
+ height="3"
+ x="1725.5"
+ y="576.5"
+ ry="1"
+ rx="1" />
+ <use
+ transform="matrix(1,0,0,-1,1529,1167)"
+ style="display:inline"
+ x="0"
+ y="0"
+ xlink:href="#expandarrow"
+ id="use2507"
+ width="100%"
+ height="100%" />
+ </g>
</g>
<g
inkscape:groupmode="layer"
@@ -6593,7 +6632,7 @@
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
- id="path4784-17"
+ id="expandarrow"
d="m 210,595 -2.5,2.5 -2.5,-2.5 z"
style="fill:#000000;fill-opacity:1;stroke:none" />
</g>