From 94c48dec0009b12dabc0a20df61b6d7a0be4d13f Mon Sep 17 00:00:00 2001 From: James Walker Date: Thu, 26 Aug 2021 19:20:07 +1200 Subject: [PATCH] at speed ui --- bf20_mill/ui/mainwindow.ui | 11 +++++++---- bf20_mill/ui/style.qss | 10 ++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/bf20_mill/ui/mainwindow.ui b/bf20_mill/ui/mainwindow.ui index a4bd371..26f6321 100644 --- a/bf20_mill/ui/mainwindow.ui +++ b/bf20_mill/ui/mainwindow.ui @@ -8638,6 +8638,9 @@ SLOWER Qt::AlignCenter + + [{"channels": [{"url": "status:din", "trigger": true}], "property": "Style Class", "expression": "'atSpeed' if ch[0][3] else 'notAtSpeed'", "name": "atSpeed"}] + spindleRPM @@ -11467,12 +11470,12 @@ Override - - - - + + + + diff --git a/bf20_mill/ui/style.qss b/bf20_mill/ui/style.qss index 58adfd0..d8b17f0 100644 --- a/bf20_mill/ui/style.qss +++ b/bf20_mill/ui/style.qss @@ -426,6 +426,16 @@ HalLabel[spindleRPM] { } +HalLabel[style='atSpeed'] { + color: black; + background: rgba(92, 243, 81, 255); +} + +HalLabel[style='notAtSpeed'] { + background: rgba(225, 67, 67, 255); +} + + /********************************************************************** * Jog Buttons * *********************************************************************/