From f6499a63b08133182f35cec999cc3b9864f37c9d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 29 Oct 2005 01:13:41 +0000 Subject: [PATCH] fix various UI bugs; use opengl-style colors --- library/ui/presentations.factor | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/library/ui/presentations.factor b/library/ui/presentations.factor index c43c221b48..59d423dd42 100644 --- a/library/ui/presentations.factor +++ b/library/ui/presentations.factor @@ -38,15 +38,21 @@ C: command-button ( gadget object -- button ) M: command-button gadget-help ( button -- string ) command-button-object dup word? [ synopsis ] [ summary ] if ; -: init-commands ( gadget -- gadget ) - ( dup presented paint-prop [ ] when* ) ; +: init-commands ( style gadget -- gadget ) + presented rot assoc [ ] when* ; + +: style-font ( style -- font ) + [ font swap assoc [ "Monospaced" ] unless* ] keep + [ font-style swap assoc [ plain ] unless* ] keep + font-size swap assoc [ 12 ] unless* 3array ; : ( style text -- label ) -