mirror of
https://github.com/linuxdeepin/dde-dock.git
synced 2025-06-04 17:33:05 +00:00
Network: support connecting spinner
Change-Id: I0107c9966d683cf6d8c16054292f9f74caf9ed34
This commit is contained in:
parent
b446c92b6f
commit
3b472f464d
Notes:
Deepin Code Review
2017-09-06 13:21:54 +08:00
Verified+1: Anonymous Coward #1000004 Code-Review+2: kirigaya <kirigaya@mkacg.com> Submitted-by: kirigaya <kirigaya@mkacg.com> Submitted-at: Wed, 06 Sep 2017 13:21:53 +0800 Reviewed-on: https://cr.deepin.io/25971 Project: dde/dde-dock Branch: refs/heads/master
@ -15,8 +15,8 @@ WiredItem::WiredItem(const QString &path)
|
||||
{
|
||||
// QIcon::setThemeName("deepin");
|
||||
|
||||
m_delayTimer->setSingleShot(true);
|
||||
m_delayTimer->setInterval(20);
|
||||
m_delayTimer->setSingleShot(false);
|
||||
m_delayTimer->setInterval(200);
|
||||
|
||||
m_itemTips->setObjectName("wired-" + path);
|
||||
m_itemTips->setVisible(false);
|
||||
@ -122,12 +122,23 @@ void WiredItem::reloadIcon()
|
||||
} else {
|
||||
NetworkManager::GlobalNetworkState gState = m_networkManager->globalNetworkState();
|
||||
|
||||
if (gState == NetworkManager::Connecting) {
|
||||
m_delayTimer->start();
|
||||
const quint64 index = QDateTime::currentMSecsSinceEpoch() / 200;
|
||||
const int num = (index % 5) + 1;
|
||||
m_icon = QPixmap(QString(":/wired/resources/wired/network-wired-symbolic-connecting%1.svg").arg(num));
|
||||
update();
|
||||
return;
|
||||
}
|
||||
|
||||
if (gState == NetworkManager::ConnectedGlobal)
|
||||
iconName.append("online");
|
||||
else
|
||||
iconName.append("idle");
|
||||
}
|
||||
|
||||
m_delayTimer->stop();
|
||||
|
||||
if (displayMode == Dock::Efficient)
|
||||
iconName.append("-symbolic");
|
||||
|
||||
|
@ -4,6 +4,13 @@
|
||||
<file>resources/wired/wired-connected.svg</file>
|
||||
<file>resources/wired/wired-disconnected-small.svg</file>
|
||||
<file>resources/wired/wired-disconnected.svg</file>
|
||||
<file>resources/wired/network-wired-symbolic-connecting1.svg</file>
|
||||
<file>resources/wired/network-wired-symbolic-connecting2.svg</file>
|
||||
<file>resources/wired/network-wired-symbolic-connecting3.svg</file>
|
||||
<file>resources/wired/network-wired-symbolic-connecting4.svg</file>
|
||||
<file>resources/wired/network-wired-symbolic-connecting5.svg</file>
|
||||
<file>resources/wired/wired-error-small.svg</file>
|
||||
<file>resources/wired/wired-unaccessable-small.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/wireless">
|
||||
<file>resources/wireless/wireless-0.svg</file>
|
||||
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>network-wired-symbolic-connecting1</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="network-wired-symbolic-connecting1" fill-rule="nonzero" fill="#FFFFFF">
|
||||
<path d="M6.3577,7.5115 C6.1667,7.5385 5.9857,7.6315 5.8547,7.7715 L4.6647,8.9595 C4.5037,9.1145 4.4077,9.3325 4.4037,9.5535 L4.4037,10.7415 L4.4037,10.7605 L2.1747,12.9605 C1.9417,13.1935 1.9417,13.5815 2.1747,13.8145 C2.4097,14.0465 2.7977,14.0465 3.0317,13.8145 L5.2587,11.5955 L6.4507,11.5955 C6.6717,11.5905 6.8907,11.4955 7.0457,11.3355 L8.2357,10.1475 C8.5427,9.8325 8.5427,9.2735 8.2357,8.9595 L7.0457,7.7715 C6.8697,7.5895 6.6097,7.4905 6.3577,7.5115" id="Fill-124"></path>
|
||||
<path d="M9.6438,8.4652 C9.8338,8.4392 10.0138,8.3452 10.1468,8.2052 L11.3358,7.0182 C11.4978,6.8622 11.5928,6.6452 11.5968,6.4232 L11.5968,5.2352 L11.5968,5.2172 L13.8248,3.0162 C14.0588,2.7842 14.0588,2.3952 13.8248,2.1622 C13.5918,1.9302 13.2028,1.9302 12.9688,2.1622 L10.7408,4.3812 L9.5508,4.3812 C9.3288,4.3862 9.1098,4.4822 8.9548,4.6422 L7.7638,5.8292 C7.4578,6.1442 7.4578,6.7032 7.7638,7.0182 L8.9548,8.2052 C9.1308,8.3882 9.3908,8.4862 9.6438,8.4652" id="Fill-126"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>network-wired-symbolic-connecting2</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="network-wired-symbolic-connecting2" fill-rule="nonzero" fill="#FFFFFF">
|
||||
<path d="M5.85775,8.00278155 C5.66675,8.02978155 5.48575,8.12278155 5.35475,8.26278155 L4.16475,9.45078155 C4.00375,9.60578155 3.90775,9.82378155 3.90375,10.0447816 L3.90375,11.2327816 L3.90375,11.2517816 L1.67475,13.4517816 C1.44175,13.6847816 1.44175,14.0727816 1.67475,14.3057816 C1.90975,14.5377816 2.29775,14.5377816 2.53175,14.3057816 L4.75875,12.0867816 L5.95075,12.0867816 C6.17175,12.0817816 6.39075,11.9867816 6.54575,11.8267816 L7.73575,10.6387816 C8.04275,10.3237816 8.04275,9.76478155 7.73575,9.45078155 L6.54575,8.26278155 C6.36975,8.08078155 6.10975,7.98178155 5.85775,8.00278155" id="Fill-124"></path>
|
||||
<path d="M10.1095,7.977 C10.2995,7.951 10.4795,7.857 10.6125,7.717 L11.8015,6.53 C11.9635,6.374 12.0585,6.157 12.0625,5.935 L12.0625,4.747 L12.0625,4.729 L14.2905,2.528 C14.5245,2.296 14.5245,1.907 14.2905,1.674 C14.0575,1.442 13.6685,1.442 13.4345,1.674 L11.2065,3.893 L10.0165,3.893 C9.7945,3.898 9.5755,3.994 9.4205,4.154 L8.2295,5.341 C7.9235,5.656 7.9235,6.215 8.2295,6.53 L9.4205,7.717 C9.5965,7.9 9.8565,7.998 10.1095,7.977" id="Fill-126"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>network-wired-symbolic-connecting3</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="network-wired-symbolic-connecting3" fill-rule="nonzero" fill="#FFFFFF">
|
||||
<path d="M5.35775,8.50278155 C5.16675,8.52978155 4.98575,8.62278155 4.85475,8.76278155 L3.66475,9.95078155 C3.50375,10.1057816 3.40775,10.3237816 3.40375,10.5447816 L3.40375,11.7327816 L3.40375,11.7517816 L1.17475,13.9517816 C0.94175,14.1847816 0.94175,14.5727816 1.17475,14.8057816 C1.40975,15.0377816 1.79775,15.0377816 2.03175,14.8057816 L4.25875,12.5867816 L5.45075,12.5867816 C5.67175,12.5817816 5.89075,12.4867816 6.04575,12.3267816 L7.23575,11.1387816 C7.54275,10.8237816 7.54275,10.2647816 7.23575,9.95078155 L6.04575,8.76278155 C5.86975,8.58078155 5.60975,8.48178155 5.35775,8.50278155" id="Fill-124"></path>
|
||||
<path d="M10.6095,7.477 C10.7995,7.451 10.9795,7.357 11.1125,7.217 L12.3015,6.03 C12.4635,5.874 12.5585,5.657 12.5625,5.435 L12.5625,4.247 L12.5625,4.229 L14.7905,2.028 C15.0245,1.796 15.0245,1.407 14.7905,1.174 C14.5575,0.942 14.1685,0.942 13.9345,1.174 L11.7065,3.393 L10.5165,3.393 C10.2945,3.398 10.0755,3.494 9.9205,3.654 L8.7295,4.841 C8.4235,5.156 8.4235,5.715 8.7295,6.03 L9.9205,7.217 C10.0965,7.4 10.3565,7.498 10.6095,7.477" id="Fill-126"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>network-wired-symbolic-connecting4</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="network-wired-symbolic-connecting4" fill-rule="nonzero" fill="#FFFFFF">
|
||||
<path d="M4.85775,9.00278155 C4.66675,9.02978155 4.48575,9.12278155 4.35475,9.26278155 L3.16475,10.4507816 C3.00375,10.6057816 2.90775,10.8237816 2.90375,11.0447816 L2.90375,12.2327816 L2.90375,12.2517816 L0.67475,14.4517816 C0.44175,14.6847816 0.44175,15.0727816 0.67475,15.3057816 C0.90975,15.5377816 1.29775,15.5377816 1.53175,15.3057816 L3.75875,13.0867816 L4.95075,13.0867816 C5.17175,13.0817816 5.39075,12.9867816 5.54575,12.8267816 L6.73575,11.6387816 C7.04275,11.3237816 7.04275,10.7647816 6.73575,10.4507816 L5.54575,9.26278155 C5.36975,9.08078155 5.10975,8.98178155 4.85775,9.00278155" id="Fill-124"></path>
|
||||
<path d="M11.1095,6.977 C11.2995,6.951 11.4795,6.857 11.6125,6.717 L12.8015,5.53 C12.9635,5.374 13.0585,5.157 13.0625,4.935 L13.0625,3.747 L13.0625,3.729 L15.2905,1.528 C15.5245,1.296 15.5245,0.907 15.2905,0.674 C15.0575,0.442 14.6685,0.442 14.4345,0.674 L12.2065,2.893 L11.0165,2.893 C10.7945,2.898 10.5755,2.994 10.4205,3.154 L9.2295,4.341 C8.9235,4.656 8.9235,5.215 9.2295,5.53 L10.4205,6.717 C10.5965,6.9 10.8565,6.998 11.1095,6.977" id="Fill-126"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>network-wired-symbolic-connecting5</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="network-wired-symbolic-connecting5" fill-rule="nonzero" fill="#FFFFFF">
|
||||
<path d="M4.35775,9.50278155 C4.16675,9.52978155 3.98575,9.62278155 3.85475,9.76278155 L2.66475,10.9507816 C2.50375,11.1057816 2.40775,11.3237816 2.40375,11.5447816 L2.40375,12.7327816 L2.40375,12.7517816 L0.17475,14.9517816 C-0.05825,15.1847816 -0.05825,15.5727816 0.17475,15.8057816 C0.40975,16.0377816 0.79775,16.0377816 1.03175,15.8057816 L3.25875,13.5867816 L4.45075,13.5867816 C4.67175,13.5817816 4.89075,13.4867816 5.04575,13.3267816 L6.23575,12.1387816 C6.54275,11.8237816 6.54275,11.2647816 6.23575,10.9507816 L5.04575,9.76278155 C4.86975,9.58078155 4.60975,9.48178155 4.35775,9.50278155" id="Fill-124"></path>
|
||||
<path d="M11.6095,6.477 C11.7995,6.451 11.9795,6.357 12.1125,6.217 L13.3015,5.03 C13.4635,4.874 13.5585,4.657 13.5625,4.435 L13.5625,3.247 L13.5625,3.229 L15.7905,1.028 C16.0245,0.796 16.0245,0.407 15.7905,0.174 C15.5575,-0.058 15.1685,-0.058 14.9345,0.174 L12.7065,2.393 L11.5165,2.393 C11.2945,2.398 11.0755,2.494 10.9205,2.654 L9.7295,3.841 C9.4235,4.156 9.4235,4.715 9.7295,5.03 L10.9205,6.217 C11.0965,6.4 11.3565,6.498 11.6095,6.477" id="Fill-126"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
Loading…
x
Reference in New Issue
Block a user