color-table: change color table to use search-tables.
parent
0b47618cb7
commit
048de72d6f
|
@ -3,7 +3,7 @@
|
||||||
USING: accessors colors.constants colors.hex combinators
|
USING: accessors colors.constants colors.hex combinators
|
||||||
combinators.smart formatting kernel literals models
|
combinators.smart formatting kernel literals models
|
||||||
sorting.human sorting.slots strings ui ui.gadgets.scrollers
|
sorting.human sorting.slots strings ui ui.gadgets.scrollers
|
||||||
ui.gadgets.tables ;
|
ui.gadgets.search-tables ui.gadgets.tables ;
|
||||||
IN: color-table
|
IN: color-table
|
||||||
|
|
||||||
! ui.gadgets.tables demo
|
! ui.gadgets.tables demo
|
||||||
|
@ -41,11 +41,12 @@ M: color-renderer row-value
|
||||||
: <color-table> ( -- table )
|
: <color-table> ( -- table )
|
||||||
named-colors { human<=> } sort-by <model>
|
named-colors { human<=> } sort-by <model>
|
||||||
color-renderer
|
color-renderer
|
||||||
<table>
|
[ ] <search-table>
|
||||||
|
dup table>>
|
||||||
5 >>gap
|
5 >>gap
|
||||||
COLOR: dark-gray >>column-line-color
|
COLOR: dark-gray >>column-line-color
|
||||||
10 >>min-rows
|
10 >>min-rows
|
||||||
10 >>max-rows ;
|
10 >>max-rows drop ;
|
||||||
|
|
||||||
MAIN-WINDOW: color-table-demo { { title "Colors" } { pref-dim { 500 300 } } }
|
MAIN-WINDOW: color-table-demo { { title "Colors" } { pref-dim { 500 300 } } }
|
||||||
<color-table> <scroller> >>gadgets ;
|
<color-table> <scroller> >>gadgets ;
|
||||||
|
|
Loading…
Reference in New Issue