help.markup: change default-style to use with-nesting.
							parent
							
								
									ef23d9ed55
								
							
						
					
					
						commit
						476389ffc4
					
				| 
						 | 
					@ -49,9 +49,7 @@ M: f print-element drop ;
 | 
				
			||||||
    [ print-element ] with-style ;
 | 
					    [ print-element ] with-style ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
: with-default-style ( quot -- )
 | 
					: with-default-style ( quot -- )
 | 
				
			||||||
    default-span-style get [
 | 
					    default-style get swap with-nesting ; inline
 | 
				
			||||||
        default-block-style get swap with-nesting
 | 
					 | 
				
			||||||
    ] with-style ; inline
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
: print-content ( element -- )
 | 
					: print-content ( element -- )
 | 
				
			||||||
    [ print-element ] with-default-style ;
 | 
					    [ print-element ] with-default-style ;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,18 +22,14 @@ IN: help.stylesheet
 | 
				
			||||||
: font-size-span ( -- n )
 | 
					: font-size-span ( -- n )
 | 
				
			||||||
    13/12 default-font-size * >integer ;
 | 
					    13/12 default-font-size * >integer ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SYMBOL: default-span-style
 | 
					SYMBOL: default-style
 | 
				
			||||||
H{
 | 
					H{
 | 
				
			||||||
    { font-name $ default-sans-serif-font-name }
 | 
					    { font-name $ default-sans-serif-font-name }
 | 
				
			||||||
    { font-size $ font-size-span }
 | 
					    { font-size $ font-size-span }
 | 
				
			||||||
    { foreground $ text-color }
 | 
					    { foreground $ text-color }
 | 
				
			||||||
    { font-style plain }
 | 
					    { font-style plain }
 | 
				
			||||||
} default-span-style set-global
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
SYMBOL: default-block-style
 | 
					 | 
				
			||||||
H{
 | 
					 | 
				
			||||||
    { wrap-margin $ wrap-margin-full }
 | 
					    { wrap-margin $ wrap-margin-full }
 | 
				
			||||||
} default-block-style set-global
 | 
					} default-style set-global
 | 
				
			||||||
 | 
					
 | 
				
			||||||
SYMBOL: link-style
 | 
					SYMBOL: link-style
 | 
				
			||||||
H{
 | 
					H{
 | 
				
			||||||
| 
						 | 
					@ -148,7 +144,7 @@ SYMBOL: bullet
 | 
				
			||||||
    [
 | 
					    [
 | 
				
			||||||
        font-size
 | 
					        font-size
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            default-span-style title-style
 | 
					            default-style title-style
 | 
				
			||||||
            help-path-style heading-style
 | 
					            help-path-style heading-style
 | 
				
			||||||
            subsection-style snippet-style
 | 
					            subsection-style snippet-style
 | 
				
			||||||
            code-char-style
 | 
					            code-char-style
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@ IN: ui.theme.switching
 | 
				
			||||||
    content-background default-font-background-color set-global
 | 
					    content-background default-font-background-color set-global
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ! help.stylesheet
 | 
					    ! help.stylesheet
 | 
				
			||||||
    default-span-style text-color foreground update-style
 | 
					    default-style text-color foreground update-style
 | 
				
			||||||
    link-style link-color foreground update-style
 | 
					    link-style link-color foreground update-style
 | 
				
			||||||
    title-style title-color foreground update-style
 | 
					    title-style title-color foreground update-style
 | 
				
			||||||
    help-path-style help-path-border-color table-border update-style
 | 
					    help-path-style help-path-border-color table-border update-style
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue