forked from qt-creator/qt-creator
Utils: Add medium sized round indicator
Change-Id: I7f66f63a905e1a9abf7905816dbd86ec3a8951ed Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Eike Ziller
parent
21a5766cee
commit
bc46e179cd
BIN
src/libs/utils/images/progressindicator_medium.png
Normal file
BIN
src/libs/utils/images/progressindicator_medium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 875 B |
BIN
src/libs/utils/images/progressindicator_medium@2x.png
Normal file
BIN
src/libs/utils/images/progressindicator_medium@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
@@ -49,14 +49,26 @@ ProgressIndicator::ProgressIndicator(IndicatorSize size, QWidget *parent)
|
||||
setIndicatorSize(size);
|
||||
}
|
||||
|
||||
static QString imageFileNameForIndicatorSize(ProgressIndicator::IndicatorSize size)
|
||||
{
|
||||
switch (size) {
|
||||
case ProgressIndicator::Large:
|
||||
return QLatin1String(":/utils/images/progressindicator_big.png");
|
||||
case ProgressIndicator::Medium:
|
||||
return QLatin1String(":/utils/images/progressindicator_medium.png");
|
||||
case ProgressIndicator::Small:
|
||||
default:
|
||||
return QLatin1String(":/utils/images/progressindicator_small.png");
|
||||
}
|
||||
}
|
||||
|
||||
void ProgressIndicator::setIndicatorSize(ProgressIndicator::IndicatorSize size)
|
||||
{
|
||||
m_size = size;
|
||||
m_rotationStep = size == Small ? 45 : 30;
|
||||
m_timer.setInterval(size == Small ? 100 : 80);
|
||||
m_pixmap.load(StyleHelper::dpiSpecificImageFile(
|
||||
size == Small ? QLatin1String(":/utils/images/progressindicator_small.png")
|
||||
: QLatin1String(":/utils/images/progressindicator_big.png")));
|
||||
imageFileNameForIndicatorSize(size)));
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ class QTCREATOR_UTILS_EXPORT ProgressIndicator : public QWidget
|
||||
public:
|
||||
enum IndicatorSize {
|
||||
Small,
|
||||
Medium,
|
||||
Large
|
||||
};
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
<file>images/crumblepath-segment-selected.png</file>
|
||||
<file>images/progressindicator_big.png</file>
|
||||
<file>images/progressindicator_big@2x.png</file>
|
||||
<file>images/progressindicator_medium.png</file>
|
||||
<file>images/progressindicator_medium@2x.png</file>
|
||||
<file>images/progressindicator_small.png</file>
|
||||
<file>images/progressindicator_small@2x.png</file>
|
||||
<file>images/triangle_vert.png</file>
|
||||
|
||||
@@ -1134,6 +1134,127 @@
|
||||
y="0"
|
||||
x="0" />
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(-0.5,0,0,0.5,589.5,300)"
|
||||
clip-path="url(#clipPath3536)"
|
||||
id="src/libs/utils/images/progressindicator_medium">
|
||||
<g
|
||||
id="g3383">
|
||||
<rect
|
||||
style="opacity:0.41699997;fill:none;stroke:none"
|
||||
id="rect3385"
|
||||
width="64"
|
||||
height="64"
|
||||
x="329"
|
||||
y="536" />
|
||||
<rect
|
||||
y="536"
|
||||
x="359"
|
||||
height="18"
|
||||
width="4"
|
||||
id="rect3387"
|
||||
style="fill:#6d6d6d;fill-opacity:1;stroke:none" />
|
||||
</g>
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3389"
|
||||
transform="matrix(0.8660254,0.5,-0.5,0.8660254,332.36483,-104.40243)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.88700005" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3391"
|
||||
transform="matrix(0.5,0.8660254,-0.8660254,0.5,672.40243,-28.635171)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.77300002" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3393"
|
||||
transform="matrix(0,1,-1,0,929,207)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.66000001" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3395"
|
||||
transform="matrix(-0.5,0.8660254,-0.8660254,-0.5,1033.4024,539.36483)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.547" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3397"
|
||||
transform="matrix(-0.8660254,0.5,-0.5,-0.8660254,957.63514,879.40243)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.43299997" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3399"
|
||||
transform="matrix(-1,0,0,-1,721.99997,1136)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3401"
|
||||
transform="matrix(-0.8660254,-0.5,0.5,-0.8660254,389.63514,1240.4024)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3403"
|
||||
transform="matrix(-0.5,-0.8660254,0.8660254,-0.5,49.597541,1164.6351)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3405"
|
||||
transform="matrix(0,-1,1,0,-207.00003,928.99993)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3407"
|
||||
transform="matrix(0.5,-0.8660254,0.8660254,0.5,-311.40246,596.6351)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
<use
|
||||
x="0"
|
||||
y="0"
|
||||
xlink:href="#g3383"
|
||||
id="use3409"
|
||||
transform="matrix(0.8660254,-0.5,0.5,0.8660254,-235.6352,256.5975)"
|
||||
width="800"
|
||||
height="600"
|
||||
style="opacity:0.31999996" />
|
||||
</g>
|
||||
<g
|
||||
id="src/libs/utils/images/progressindicator_big"
|
||||
clip-path="url(#clipPath3536)"
|
||||
|
||||
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 76 KiB |
Reference in New Issue
Block a user