diff --git a/basis/ui/tools/traceback/traceback.factor b/basis/ui/tools/traceback/traceback.factor index e08a279006..1558b0fcb4 100644 --- a/basis/ui/tools/traceback/traceback.factor +++ b/basis/ui/tools/traceback/traceback.factor @@ -3,8 +3,8 @@ USING: accessors arrays continuations fonts fry inspector kernel models models.arrow prettyprint sequences ui.commands ui.gadgets ui.gadgets.borders ui.gadgets.buttons -ui.gadgets.labeled ui.gadgets.panes ui.gadgets.scrollers -ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.tracks +ui.gadgets.labeled ui.gadgets.lines ui.gadgets.panes ui.gadgets.scrollers +ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.toolbar ui.gadgets.tracks ui.gestures ui.tools.common ; QUALIFIED-WITH: ui.tools.inspector i IN: ui.tools.traceback @@ -51,19 +51,19 @@ TUPLE: traceback-gadget < tool ; : ( model -- gadget ) [ vertical traceback-gadget new-track - { 3 3 } >>gap + with-lines ] dip [ >>model ] [ - [ vertical { 3 3 } >>gap ] dip + [ vertical with-lines ] dip [ - [ horizontal { 3 3 } >>gap ] dip + [ horizontal with-lines ] dip [ 1/2 track-add ] [ 1/2 track-add ] bi 1/3 track-add ] [ 2/3 track-add ] bi - { 3 3 } 1 track-add + 1 track-add ] bi add-toolbar ; diff --git a/basis/ui/tools/walker/walker.factor b/basis/ui/tools/walker/walker.factor index 2fda954e4e..b5308eec07 100644 --- a/basis/ui/tools/walker/walker.factor +++ b/basis/ui/tools/walker/walker.factor @@ -1,10 +1,10 @@ ! Copyright (C) 2006, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors kernel concurrency.messaging inspector -ui.tools.listener ui.tools.traceback ui.gadgets.buttons -ui.gadgets.status-bar ui.gadgets.tracks ui.commands ui.gadgets +USING: accessors colors kernel concurrency.messaging colors.constants inspector +ui.tools.listener ui.tools.traceback ui.gadgets.buttons ui.gadgets.lines +ui.gadgets.status-bar ui.gadgets.toolbar ui.gadgets.tracks ui.commands ui.gadgets models models.arrow ui.tools.browser ui.tools.common ui.gestures -ui.gadgets.labels ui threads namespaces make tools.walker assocs +ui.gadgets.labels ui.pens.solid ui threads namespaces make tools.walker assocs combinators fry ; IN: ui.tools.walker @@ -54,17 +54,27 @@ M: walker-gadget focusable-child* : ( model thread -- gadget ) '[ _ walker-state-string ] ; + +CONSTANT: thread-status-color +T{ rgba { red 0.9295 } { green 0.9569 } { blue 0.8510 } { alpha 1.0 } } inline + +: add-thread-status ( track -- track ) + dup status>> self margins + thread-status-color >>interior + f track-add ; + +: add-traceback ( track -- track ) + dup traceback>> 1 track-add ; : ( status continuation thread -- gadget ) - vertical walker-gadget new-track + vertical walker-gadget new-track with-lines swap >>thread swap >>continuation swap >>status dup continuation>> >>traceback - add-toolbar - dup status>> self f track-add - dup traceback>> 1 track-add ; + add-thread-status + add-traceback ; : walker-help ( -- ) "ui-walker" com-browse ;