Skip to content

Commit 50f34cf

Browse files
committed
indicate transmitting also with a red background
1 parent 86e03bc commit 50f34cf

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

ui/entryView.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,16 @@ func (v *entryView) SetTXState(ptt bool, parrotActive bool, parrotTimeLeft time.
278278
case parrotActive:
279279
text = fmt.Sprintf("%s", parrot) // TODO: append parrotTimeLeft when available
280280
case ptt:
281-
text = "TX"
281+
text = "On Air"
282282
default:
283-
text = "RX"
283+
text = ""
284284
}
285285

286-
// TODO: set the background color to red while transmitting
286+
if ptt {
287+
style.AddClass(&v.txIndicator.Widget, txClass)
288+
} else {
289+
style.RemoveClass(&v.txIndicator.Widget, txClass)
290+
}
287291

288292
v.txIndicator.SetText(text)
289293
}
@@ -415,6 +419,7 @@ func (v *entryView) widgetToField(widget *gtk.Widget) core.EntryField {
415419
const (
416420
entryDuplicateClass style.Class = "entry-duplicate"
417421
entryEditingClass style.Class = "entry-editing"
422+
txClass style.Class = "transmitting"
418423
)
419424

420425
func (v *entryView) SetDuplicateMarker(duplicate bool) {

ui/style/contest.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
@define-color hellocontest-timeindicator @theme_selected_bg_color;
2626
@define-color hellocontest-lowzone #CCCCCC;
2727

28+
@define-color hellocontest-tx-fg #FFFFFF;
29+
@define-color hellocontest-tx-bg #FF0000;
30+
2831
/*
2932
* Entry area
3033
*/
@@ -35,10 +38,16 @@
3538
}
3639

3740
.entry-editing {
38-
background-color: #97C1F6;
41+
background-color: #97c1f6;
3942
color: black;
4043
}
4144

45+
.transmitting {
46+
background-color: @hellocontest-tx-bg;
47+
color: @hellocontest-tx-fg;
48+
border-radius: 10px;
49+
}
50+
4251
/*
4352
* Callinfo window
4453
*/
@@ -137,4 +146,4 @@ button.band label.max-value {
137146
label.score_table {
138147
background-color: @theme_bg_color;
139148
color: @theme_text_color;
140-
}
149+
}

0 commit comments

Comments
 (0)