Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Moved default zoom level from Advanced to General prefs
Browse files Browse the repository at this point in the history
Closes #5697

Auditors: @bsclifton @bradleyrichter

Test Plan:
1. Open about:preferences#general
2. Make sure the default zoom level exists between Language and Import Browser Data
3. Open about:preferences#advanced
4. Make sure the default zoom level no longer exists
  • Loading branch information
Suguru Hirahara authored and bbondy committed Dec 14, 2016
1 parent 0c7ee15 commit 58175ef
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,7 @@ class GeneralTab extends ImmutableComponent {
onClick={this.setAsDefaultBrowser} />
</SettingItem>

const defaultZoomSetting = getSetting(settings.DEFAULT_ZOOM_LEVEL, this.props.settings)
return <SettingsList>
<div className='sectionTitle' data-l10n-id='generalSettings' />
<SettingsList>
Expand Down Expand Up @@ -690,6 +691,18 @@ class GeneralTab extends ImmutableComponent {
{languageOptions}
</select>
</SettingItem>
<SettingItem dataL10nId='defaultZoomLevel'>
<select
className='form-control'
value={defaultZoomSetting === undefined || defaultZoomSetting === null ? config.zoom.defaultValue : defaultZoomSetting}
data-type='float'
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.DEFAULT_ZOOM_LEVEL)}>
{
config.zoom.zoomLevels.map((x) =>
<option value={x} key={x}>{getZoomValuePercentage(x) + '%'}</option>)
}
</select>
</SettingItem>
<SettingItem dataL10nId='importBrowserData'>
<Button l10nId='importNow' className='primaryButton importNowButton'
onClick={this.importBrowserDataNow} />
Expand Down Expand Up @@ -1607,22 +1620,9 @@ class SecurityTab extends ImmutableComponent {

class AdvancedTab extends ImmutableComponent {
render () {
const defaultZoomSetting = getSetting(settings.DEFAULT_ZOOM_LEVEL, this.props.settings)
return <div>
<div className='sectionTitle' data-l10n-id='contentSettings' />
<SettingsList>
<SettingItem dataL10nId='defaultZoomLevel'>
<select
className='form-control'
value={defaultZoomSetting === undefined || defaultZoomSetting === null ? config.zoom.defaultValue : defaultZoomSetting}
data-type='float'
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.DEFAULT_ZOOM_LEVEL)}>
{
config.zoom.zoomLevels.map((x) =>
<option value={x} key={x}>{getZoomValuePercentage(x) + '%'}</option>)
}
</select>
</SettingItem>
<SettingCheckbox dataL10nId='useHardwareAcceleration' prefKey={settings.HARDWARE_ACCELERATION_ENABLED} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
<SettingCheckbox dataL10nId='useSmoothScroll' prefKey={settings.SMOOTH_SCROLL_ENABLED} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
<SettingCheckbox dataL10nId='sendCrashReports' prefKey={settings.SEND_CRASH_REPORTS} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
Expand Down

0 comments on commit 58175ef

Please sign in to comment.