parent
61552d2901
commit
279795dbfd
|
@ -18,7 +18,7 @@ CONSTANT: column-title-background COLOR: grey95
|
||||||
CONSTANT: roll-button-rollover-border COLOR: gray50
|
CONSTANT: roll-button-rollover-border COLOR: gray50
|
||||||
CONSTANT: roll-button-selected-background COLOR: dark-gray
|
CONSTANT: roll-button-selected-background COLOR: dark-gray
|
||||||
|
|
||||||
CONSTANT: source-files-color COLOR: NavajoWhite
|
CONSTANT: source-files-color COLOR: yellow2
|
||||||
CONSTANT: errors-color COLOR: chocolate1
|
CONSTANT: errors-color COLOR: chocolate1
|
||||||
CONSTANT: details-color COLOR: SlateGray2
|
CONSTANT: details-color COLOR: SlateGray2
|
||||||
|
|
||||||
|
@ -39,7 +39,11 @@ CONSTANT: contents-color COLOR: orchid2
|
||||||
CONSTANT: help-header-background
|
CONSTANT: help-header-background
|
||||||
T{ rgba { red 0.9568 } { green 0.9450 } { blue 0.8509 } { alpha 1.0 } } inline
|
T{ rgba { red 0.9568 } { green 0.9450 } { blue 0.8509 } { alpha 1.0 } } inline
|
||||||
|
|
||||||
CONSTANT: thread-status-background
|
CONSTANT: thread-status-stopped-background
|
||||||
|
T{ rgba { red 0.9568 } { green 0.8509 } { blue 0.8509 } { alpha 1.0 } } inline
|
||||||
|
CONSTANT: thread-status-suspended-background
|
||||||
|
T{ rgba { red 0.9568 } { green 0.9450 } { blue 0.8509 } { alpha 1.0 } } inline
|
||||||
|
CONSTANT: thread-status-running-background
|
||||||
T{ rgba { red 0.9295 } { green 0.9569 } { blue 0.8510 } { alpha 1.0 } } inline
|
T{ rgba { red 0.9295 } { green 0.9569 } { blue 0.8510 } { alpha 1.0 } } inline
|
||||||
|
|
||||||
CONSTANT: error-summary-background
|
CONSTANT: error-summary-background
|
||||||
|
|
|
@ -38,26 +38,36 @@ M: walker-gadget ungraft*
|
||||||
M: walker-gadget focusable-child*
|
M: walker-gadget focusable-child*
|
||||||
traceback>> ;
|
traceback>> ;
|
||||||
|
|
||||||
: walker-state-string ( status thread -- string )
|
: thread-status-text ( status thread -- string )
|
||||||
[
|
name>> swap {
|
||||||
"Thread: " %
|
{ +stopped+ "Stopped" }
|
||||||
dup name>> %
|
{ +suspended+ "Suspended" }
|
||||||
" (" %
|
{ +running+ "Running" }
|
||||||
swap {
|
} at "Thread: %s (%s)" sprintf ;
|
||||||
{ +stopped+ "Stopped" }
|
|
||||||
{ +suspended+ "Suspended" }
|
: thread-status-color ( status -- color )
|
||||||
{ +running+ "Running" }
|
{
|
||||||
} at %
|
{ +stopped+ [ thread-status-stopped-background ] }
|
||||||
")" %
|
{ +suspended+ [ thread-status-suspended-background ] }
|
||||||
drop
|
{ +running+ [ thread-status-running-background ] }
|
||||||
] "" make ;
|
{ f [ content-background ] }
|
||||||
|
} case ;
|
||||||
|
|
||||||
|
TUPLE: thread-status < label thread ;
|
||||||
|
|
||||||
|
M: thread-status model-changed
|
||||||
|
[ value>> ] dip {
|
||||||
|
[ [ thread>> thread-status-text ] [ string<< ] bi ]
|
||||||
|
[ [ thread-status-color <solid> ] [ parent>> interior<< ] bi* ]
|
||||||
|
} 2cleave ;
|
||||||
|
|
||||||
: <thread-status> ( model thread -- gadget )
|
: <thread-status> ( model thread -- gadget )
|
||||||
'[ _ walker-state-string ] <arrow> <label-control> ;
|
"" thread-status new-label
|
||||||
|
swap >>thread
|
||||||
|
swap >>model ;
|
||||||
|
|
||||||
: add-thread-status ( track -- track )
|
: add-thread-status ( track -- track )
|
||||||
dup status>> self <thread-status> margins
|
dup status>> self <thread-status> margins
|
||||||
thread-status-background <solid> >>interior
|
|
||||||
f track-add ;
|
f track-add ;
|
||||||
|
|
||||||
: add-traceback ( track -- track )
|
: add-traceback ( track -- track )
|
||||||
|
|
Loading…
Reference in New Issue