slides: fix the vocab to use relative sizes

db4
Björn Lindqvist 2015-10-24 14:57:54 +02:00
parent 9ca00a3c75
commit 753ebb1582
1 changed files with 18 additions and 14 deletions

View File

@ -1,7 +1,7 @@
! Copyright (C) 2007, 2010 Slava Pestov. ! Copyright (C) 2007, 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays colors fry help.markup help.stylesheet USING: accessors arrays colors fonts fry help.markup help.stylesheet
io.styles kernel math math.ranges models namespaces parser io.styles kernel literals math math.ranges models namespaces parser
sequences system ui ui.gadgets ui.gadgets.books ui.gadgets.panes sequences system ui ui.gadgets ui.gadgets.books ui.gadgets.panes
ui.gestures ui.pens.gradient ui.pens.solid ; ui.gestures ui.pens.gradient ui.pens.solid ;
IN: slides IN: slides
@ -10,19 +10,19 @@ CONSTANT: stylesheet
H{ H{
{ default-span-style { default-span-style
H{ H{
{ font-name "sans-serif" } { font-name $ default-sans-serif-font-name }
{ font-size 36 } { font-size $[ default-font-size 3 * ] }
} }
} }
{ default-block-style { default-block-style
H{ H{
{ wrap-margin 1100 } { wrap-margin $[ default-font-size 92 * ] }
} }
} }
{ code-char-style { code-char-style
H{ H{
{ font-name "monospace" } { font-name $ default-monospace-font-name }
{ font-size 36 } { font-size $[ default-font-size 3 * ] }
} }
} }
{ code-style { code-style
@ -32,24 +32,28 @@ CONSTANT: stylesheet
} }
{ snippet-style { snippet-style
H{ H{
{ font-name "monospace" } { font-name $ default-monospace-font-name }
{ font-size 36 } { font-size $[ default-font-size 3 * ] }
{ foreground T{ rgba f 0.1 0.1 0.4 1 } } { foreground T{ rgba f 0.1 0.1 0.4 1 } }
} }
} }
{ table-content-style { table-content-style
H{ { wrap-margin 1000 } } H{ { wrap-margin $[ default-font-size 83 * ] } }
} }
{ list-style { list-style
H{ { table-gap { 10 20 } } } H{
{ table-gap ${ default-font-size 5/6 *
default-font-size 10/6 * }
}
}
} }
} }
: $title ( string -- ) : $title ( string -- )
[ [
H{ H{
{ font-name "sans-serif" } { font-name $ default-sans-serif-font-name }
{ font-size 48 } { font-size $[ default-font-size 4 * ] }
} format } format
] ($block) ; ] ($block) ;
@ -66,7 +70,7 @@ CONSTANT: stylesheet
[ [
<gadget> <gadget>
divider-interior >>interior divider-interior >>interior
{ 800 10 } >>dim ${ default-font-size 67 * default-font-size 5/6 * } >>dim
{ 1 0 } >>orientation { 1 0 } >>orientation
gadget. gadget.
] ($block) ; ] ($block) ;