@ -4,6 +4,7 @@ import omitBy from 'lodash.omitby'
import ThemeSelect from './ThemeSelect'
import ThemeSelect from './ThemeSelect'
import FontSelect from './FontSelect'
import FontSelect from './FontSelect'
import Slider from './Slider'
import Slider from './Slider'
import Input from './Input'
import Toggle from './Toggle'
import Toggle from './Toggle'
import Popout , { managePopout } from './Popout'
import Popout , { managePopout } from './Popout'
import Button from './Button'
import Button from './Button'
@ -24,6 +25,7 @@ const WindowSettings = React.memo(
dropShadowOffsetY ,
dropShadowOffsetY ,
windowControls ,
windowControls ,
lineNumbers ,
lineNumbers ,
firstLineNumber ,
widthAdjustment ,
widthAdjustment ,
watermark ,
watermark ,
onWidthChanging ,
onWidthChanging ,
@ -79,6 +81,18 @@ const WindowSettings = React.memo(
enabled = { lineNumbers }
enabled = { lineNumbers }
onChange = { onChange . bind ( null , 'lineNumbers' ) }
onChange = { onChange . bind ( null , 'lineNumbers' ) }
/ >
/ >
{ lineNumbers && (
< div className = "row settings-row first-line-number-row" >
< Input
label = "First line number"
type = "number"
value = { firstLineNumber }
min = { 0 }
onChange = { e => onChange ( 'firstLineNumber' , Number ( e . target . value ) ) }
width = "50%"
/ >
< / d i v >
) }
< Toggle
< Toggle
label = "Auto-adjust width"
label = "Auto-adjust width"
enabled = { widthAdjustment }
enabled = { widthAdjustment }
@ -87,10 +101,6 @@ const WindowSettings = React.memo(
< Toggle label = "Watermark" enabled = { watermark } onChange = { onChange . bind ( null , 'watermark' ) } / >
< Toggle label = "Watermark" enabled = { watermark } onChange = { onChange . bind ( null , 'watermark' ) } / >
< style jsx >
< style jsx >
{ `
{ `
. row {
display : flex ;
}
. row > : global ( div : first - child ) {
. row > : global ( div : first - child ) {
border - right : 1 px solid $ { COLORS . SECONDARY } ;
border - right : 1 px solid $ { COLORS . SECONDARY } ;
}
}
@ -99,6 +109,14 @@ const WindowSettings = React.memo(
. drop - shadow - options : global ( label ) {
. drop - shadow - options : global ( label ) {
opacity : 0.5 ;
opacity : 0.5 ;
}
}
. settings - content : global ( . settings - row : focus - within ) {
outline : - webkit - focus - ring - color auto 5 px ;
}
. first - line - number - row {
padding : 8 px 12 px 8 px 8 px ;
}
` }
` }
< / s t y l e >
< / s t y l e >
< / d i v >
< / d i v >
@ -184,7 +202,6 @@ const MiscSettings = React.memo(({ format, reset, applyPreset, settings }) => {
< style jsx >
< style jsx >
{ `
{ `
. row {
. row {
display : flex ;
flex : 1 ;
flex : 1 ;
}
}
. settings - content {
. settings - content {
@ -365,6 +382,7 @@ class Settings extends React.PureComponent {
dropShadowOffsetY = { this . props . dropShadowOffsetY }
dropShadowOffsetY = { this . props . dropShadowOffsetY }
windowControls = { this . props . windowControls }
windowControls = { this . props . windowControls }
lineNumbers = { this . props . lineNumbers }
lineNumbers = { this . props . lineNumbers }
firstLineNumber = { this . props . firstLineNumber }
widthAdjustment = { this . props . widthAdjustment }
widthAdjustment = { this . props . widthAdjustment }
watermark = { this . props . watermark }
watermark = { this . props . watermark }
/ >
/ >