ProjectExplorer: Introduce a small device status icon

Device status overlay and the device status display should be two
separate icons. This change makes it happen.

Change-Id: I3a965fdb8b74c447a5cf80e4c90a3ae06c91b3bc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Alessandro Portale
2016-11-02 18:28:31 +01:00
parent 7dbc62a182
commit c110eac3ec
3 changed files with 12 additions and 3 deletions

View File

@@ -44,10 +44,16 @@ const Icon RUN_FLAT({
const Icon WINDOW(":/projectexplorer/images/window.png");
const Icon DEBUG_START(":/projectexplorer/images/debugger_start.png");
const Icon DEVICE_READY_INDICATOR({
{":/utils/images/filledcircle.png", Theme::IconsRunColor}}, Icon::Tint);
const Icon DEVICE_READY_INDICATOR_OVERLAY({
{":/projectexplorer/images/devicestatusindicator.png", Theme::IconsRunToolBarColor}});
const Icon DEVICE_CONNECTED_INDICATOR({
{":/utils/images/filledcircle.png", Theme::IconsWarningColor}}, Icon::Tint);
const Icon DEVICE_CONNECTED_INDICATOR_OVERLAY({
{":/projectexplorer/images/devicestatusindicator.png", Theme::IconsWarningToolBarColor}});
const Icon DEVICE_DISCONNECTED_INDICATOR({
{":/utils/images/filledcircle.png", Theme::IconsStopColor}}, Icon::Tint);
const Icon DEVICE_DISCONNECTED_INDICATOR_OVERLAY({
{":/projectexplorer/images/devicestatusindicator.png", Theme::IconsStopToolBarColor}});
const Icon DEBUG_START_FLAT({

View File

@@ -41,8 +41,11 @@ PROJECTEXPLORER_EXPORT extern const Utils::Icon RUN_FLAT;
PROJECTEXPLORER_EXPORT extern const Utils::Icon WINDOW;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_READY_INDICATOR;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_READY_INDICATOR_OVERLAY;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_CONNECTED_INDICATOR;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_CONNECTED_INDICATOR_OVERLAY;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_DISCONNECTED_INDICATOR;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEVICE_DISCONNECTED_INDICATOR_OVERLAY;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START_FLAT;
PROJECTEXPLORER_EXPORT extern const Utils::Icon DEBUG_START_SMALL;

View File

@@ -723,7 +723,7 @@ void Target::updateDeviceState()
IDevice::ConstPtr current = DeviceKitInformation::device(kit());
QIcon overlay;
static const QIcon disconnected = Icons::DEVICE_DISCONNECTED_INDICATOR.icon();
static const QIcon disconnected = Icons::DEVICE_DISCONNECTED_INDICATOR_OVERLAY.icon();
if (current.isNull()) {
overlay = disconnected;
} else {
@@ -733,12 +733,12 @@ void Target::updateDeviceState()
setToolTip(QString());
return;
case IDevice::DeviceReadyToUse: {
static const QIcon ready = Icons::DEVICE_READY_INDICATOR.icon();
static const QIcon ready = Icons::DEVICE_READY_INDICATOR_OVERLAY.icon();
overlay = ready;
break;
}
case IDevice::DeviceConnected: {
static const QIcon connected = Icons::DEVICE_CONNECTED_INDICATOR.icon();
static const QIcon connected = Icons::DEVICE_CONNECTED_INDICATOR_OVERLAY.icon();
overlay = connected;
break;
}