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

Commit

Permalink
Changing Toolbar and UI element scale now prompts for restart
Browse files Browse the repository at this point in the history
Fixes #10132

Auditors: @bbondy, @alexwykoff

Test Plan:
1. Visit the Advanced tab under about:preferences
2. Notice the Toolbar and UI element scale item now has a * next to it, signifying it prompts for restart
3. Change the value for Toolbar and UI element scale to a different value
4. Notice you are prompted to restart
  • Loading branch information
bsclifton committed Jul 25, 2017
1 parent edf2d34 commit b3005cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ enableMetamask=Enable MetaMask
useHardwareAcceleration=Use hardware acceleration when available *
useSmoothScroll=Enable smooth scrolling *
defaultZoomLevel=Default zoom level
toolbarUserInterfaceScale=Toolbar and UI elements scale
toolbarUserInterfaceScale=Toolbar and UI elements scale *
swipeNavigationDistance=Swipe Navigation Distance
short=Short
long=Long
Expand Down
17 changes: 12 additions & 5 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,18 @@ class AboutPreferences extends React.Component {
settings: this.state.settings.set(key, value)
})
aboutActions.changeSetting(key, value)
if (key === settings.HARDWARE_ACCELERATION_ENABLED ||
key === settings.DO_NOT_TRACK ||
key === settings.LANGUAGE ||
key === settings.PDFJS_ENABLED || key === settings.TORRENT_VIEWER_ENABLED ||
key === settings.SMOOTH_SCROLL_ENABLED || key === settings.SEND_CRASH_REPORTS || key === settings.UPDATE_TO_PREVIEW_RELEASES) {
const settingsRequiringRestart = [
settings.HARDWARE_ACCELERATION_ENABLED,
settings.DO_NOT_TRACK,
settings.LANGUAGE,
settings.PDFJS_ENABLED,
settings.TORRENT_VIEWER_ENABLED,
settings.SMOOTH_SCROLL_ENABLED,
settings.SEND_CRASH_REPORTS,
settings.UPDATE_TO_PREVIEW_RELEASES,
settings.TOOLBAR_UI_SCALE
]
if (settingsRequiringRestart.includes(key)) {
ipc.send(messages.PREFS_RESTART, key, value)
}
if (key === settings.PAYMENTS_ENABLED) {
Expand Down

0 comments on commit b3005cc

Please sign in to comment.