diff --git a/extra/ui/frp/frp.factor b/extra/ui/frp/frp.factor index 699d034c72..76f746de71 100644 --- a/extra/ui/frp/frp.factor +++ b/extra/ui/frp/frp.factor @@ -1,7 +1,7 @@ -USING: accessors arrays colors fonts kernel models +USING: accessors arrays colors fonts kernel math models models.product monads sequences ui.gadgets ui.gadgets.buttons ui.gadgets.editors ui.gadgets.line-support ui.gadgets.tables -ui.gadgets.tracks ui.render ui.gadgets.scrollers ; +ui.gadgets.tracks ui.render ui.gadgets.scrollers ui.baseline-alignment ; QUALIFIED: make IN: ui.frp @@ -23,7 +23,7 @@ M: frp-table row-color color-quot>> [ call( a -- b ) ] [ drop f ] if* ; : ( model -- table ) [ 1array ] >>quot ; : ( -- table ) f ; -: ( -- field ) f ; +: ( -- field ) "" ; ! Layout utilities @@ -42,8 +42,11 @@ M: gadget -> dup make:, output-model ; M: model -> dup , ; M: table -> dup , selected-value>> ; + +! : ( -- ) ,( 100% 100% ) ; +! Add a % object as a possibility for pref-dim : ( gadgets type -- track ) - [ { } make:make ] dip swap [ f track-add ] each ; inline + [ { } make:make ] dip +baseline+ >>align swap [ f track-add ] each ; inline : ( gadgets type -- track ) [ ] [ [ model>> ] map ] bi >>model ; inline : ( gadgets -- track ) horizontal ; inline : ( gadgets -- track ) horizontal ; inline diff --git a/extra/ui/gadgets/comboboxes/comboboxes.factor b/extra/ui/gadgets/comboboxes/comboboxes.factor index b0dbe34d16..a937b73d35 100644 --- a/extra/ui/gadgets/comboboxes/comboboxes.factor +++ b/extra/ui/gadgets/comboboxes/comboboxes.factor @@ -1,6 +1,6 @@ USING: accessors arrays kernel math.rectangles models sequences ui.frp ui.gadgets ui.gadgets.glass ui.gadgets.labels -ui.gadgets.tables ui.gestures ; +ui.gadgets.tables ui.gestures colors.constants fonts ; IN: ui.gadgets.comboboxes TUPLE: combo-table < table spawner ; @@ -19,4 +19,4 @@ combobox H{ : ( options -- combobox ) [ first [ combobox new-label ] keep >>model ] keep [ 1array ] map trivial-renderer combo-table new-table - >>table ; \ No newline at end of file + >>table dup font>> COLOR: gray >>background 12 >>size >>font ; \ No newline at end of file