From 89b5875132d91b16001806b0044514e9d69907d9 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 14 Aug 2021 22:55:45 +0100 Subject: [PATCH] More colour tweaks to GPIO pins in Insight --- .../Widgets/TargetWidgets/TargetPinBodyWidget.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp index 357b12db..a8e35126 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetWidgets/TargetPinBodyWidget.cpp @@ -45,14 +45,19 @@ QColor TargetPinBodyWidget::getBodyColor() { && this->pinState->ioDirection.has_value() ) { const auto ioDirection = this->pinState->ioDirection.value(); + const auto ioState = this->pinState->ioState.value(); if (this->pinState->ioState.value() == TargetPinState::IoState::HIGH) { pinColor = ioDirection == TargetPinState::IoDirection::OUTPUT ? this->outputHighBodyColor : this->inputHighBodyColor; } - if (ioDirection == TargetPinState::IoDirection::OUTPUT && !this->hoverActive) { - pinColor.setAlpha(200); + if (( + ioDirection == TargetPinState::IoDirection::OUTPUT + || (ioDirection == TargetPinState::IoDirection::INPUT && ioState == TargetPinState::IoState::LOW) + ) && !this->hoverActive + ) { + pinColor.setAlpha(220); } } }