]> gitweb.factorcode.org Git - factor.git/commitdiff
io.styles: renamed the 'border-width' style to 'inset'. inset takes a pair of 2 numbe...
authorKeith Lazuka <klazuka@gmail.com>
Wed, 9 Sep 2009 19:50:25 +0000 (15:50 -0400)
committerKeith Lazuka <klazuka@gmail.com>
Wed, 9 Sep 2009 19:50:25 +0000 (15:50 -0400)
basis/help/stylesheet/stylesheet.factor
basis/help/tips/tips.factor
basis/html/streams/streams.factor
basis/io/styles/styles-docs.factor
basis/io/styles/styles.factor
basis/ui/gadgets/panes/panes.factor

index 7f7975a6522c7dede7751b67fbbf5c9d92dc9d94..c2e8e98476e8c251e997a20843e2de1f48e1457b 100644 (file)
@@ -35,7 +35,7 @@ H{
     { wrap-margin 500 }
     { foreground COLOR: gray20 }
     { page-color COLOR: FactorLightTan }
-    { border-width 5 }
+    { inset { 5 5 } }
 } title-style set-global
 
 SYMBOL: help-path-style
@@ -72,7 +72,7 @@ H{
 SYMBOL: code-style
 H{
     { page-color COLOR: FactorLightTan }
-    { border-width 5 }
+    { inset { 5 5 } }
     { wrap-margin f }
 } code-style set-global
 
@@ -89,7 +89,7 @@ SYMBOL: warning-style
 H{
     { page-color COLOR: gray90 }
     { border-color COLOR: red }
-    { border-width 5 }
+    { inset { 5 5 } }
     { wrap-margin 500 }
 } warning-style set-global
 
@@ -97,7 +97,7 @@ SYMBOL: deprecated-style
 H{
     { page-color COLOR: gray90 }
     { border-color COLOR: red }
-    { border-width 5 }
+    { inset { 5 5 } }
     { wrap-margin 500 }
 } deprecated-style set-global
 
index 4685b6c5172f364ccea9bea9eb69f0eb4ab1c1d7..8569be0b8f900ce66a61139624916da1c2dc34ab 100644 (file)
@@ -30,7 +30,7 @@ SYMBOL: tip-of-the-day-style
 
 H{
     { page-color COLOR: lavender }
-    { border-width 5 }
+    { inset { 5 5 } }
     { wrap-margin 500 }
 } tip-of-the-day-style set-global
 
index 49a9225402d32b7fa537a984422e2c94479fb5c8..26a3d5f391bca3539c1cfa8d9fe84222bc733930 100644 (file)
@@ -99,7 +99,8 @@ M: html-span-stream dispose
 : border-css, ( border -- )
     "border: 1px solid #" % hex-color, "; " % ;
 
-: padding-css, ( padding -- ) "padding: " % # "px; " % ;
+: padding-css, ( padding -- )
+    first2 "padding: " % # "px " % # "px; " % ;
 
 CONSTANT: pre-css "white-space: pre; font-family: monospace;"
 
@@ -108,7 +109,7 @@ CONSTANT: pre-css "white-space: pre; font-family: monospace;"
         {
             { page-color bg-css, }
             { border-color border-css, }
-            { border-width padding-css, }
+            { inset padding-css, }
         } make-css
     ] [
         wrap-margin swap at
index a952c05dbf5884dbb05bff21d44c73dddf2d251b..19952b2b157ccbbb93171ab9240a69716ac6f795 100755 (executable)
@@ -140,7 +140,7 @@ ARTICLE: "paragraph-styles" "Paragraph styles"
 "Paragraph styles for " { $link with-nesting } ":"
 { $subsection page-color }
 { $subsection border-color }
-{ $subsection border-width }
+{ $subsection inset }
 { $subsection wrap-margin }
 { $subsection presented } ;
 
@@ -250,10 +250,10 @@ HELP: border-color
     { $code "H{ { border-color T{ rgba f 1 0 0 1 } } }\n[ \"A border\" write ] with-nesting nl" }
 } ;
 
-HELP: border-width
-{ $description "Paragraph style. Pixels between edge of text and border, an integer." } 
+HELP: inset
+{ $description "Paragraph style. A pair of integers representing the number of pixels that the content should be inset from the border. The first number is the horizontal inset, and the second is the vertical inset." } 
 { $examples
-    { $code "H{ { border-width 10 } }\n[ \"Some inset text\" write ] with-nesting nl" }
+    { $code "H{ { inset { 10 10 } } }\n[ \"Some inset text\" write ] with-nesting nl" }
 } ;
 
 HELP: wrap-margin
index 108d4c9eb04ec4dc4b1621c6a747a8fa6a5dd67d..a3a1d991f36e06a31cc70521f6562dc85c58c434 100644 (file)
@@ -135,7 +135,7 @@ SYMBOL: image
 ! Paragraph styles
 SYMBOL: page-color
 SYMBOL: border-color
-SYMBOL: border-width
+SYMBOL: inset
 SYMBOL: wrap-margin
 
 ! Table styles
index 6f68c32ff0455e53a655d558d8ae6e09739c3e38..50a609b89765317d95cb6ebc01497e30c52e15b9 100644 (file)
@@ -242,11 +242,11 @@ MEMO: specified-font ( assoc -- font )
 : apply-page-color-style ( style gadget -- style gadget )
     page-color [ <solid> >>interior ] apply-style ;
 
-: apply-border-width-style ( style gadget -- style gadget )
-    border-width [ dup 2array <border> ] apply-style ;
+: apply-inset-style ( style gadget -- style gadget )
+    inset [ <border> ] apply-style ;
 
 : style-pane ( style pane -- pane )
-    apply-border-width-style
+    apply-inset-style
     apply-border-color-style
     apply-page-color-style
     apply-presentation-style