Load theme as a user setting; allow the user to change it; update tests.
This commit is contained in:
@@ -185,7 +185,7 @@ define [
|
||||
"twilight", "vibrant_ink"
|
||||
]
|
||||
$scope.darkTheme = false
|
||||
$scope.$watch "settings.theme", (theme) ->
|
||||
$scope.$watch "settings.editorTheme", (theme) ->
|
||||
if theme in DARK_THEMES
|
||||
$scope.darkTheme = true
|
||||
else
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ define [
|
||||
@redrawAnnotations()
|
||||
|
||||
@$scope.$watch "theme", (value) =>
|
||||
console.log value
|
||||
@redrawAnnotations()
|
||||
|
||||
@editor.on "mousemove", (e) =>
|
||||
|
||||
@@ -19,9 +19,13 @@ define [
|
||||
$scope.settings.fontSize = newVal
|
||||
return $scope.settings.fontSize.toString()
|
||||
|
||||
$scope.$watch "settings.theme", (theme, oldTheme) =>
|
||||
if theme != oldTheme
|
||||
settings.saveSettings({theme: theme})
|
||||
$scope.$watch "settings.editorTheme", (editorTheme, oldEditorTheme) =>
|
||||
if editorTheme != oldEditorTheme
|
||||
settings.saveSettings({editorTheme})
|
||||
|
||||
$scope.$watch "settings.overallTheme", (overallTheme, oldOverallTheme) =>
|
||||
if overallTheme != oldOverallTheme
|
||||
settings.saveSettings({overallTheme})
|
||||
|
||||
$scope.$watch "settings.fontSize", (fontSize, oldFontSize) =>
|
||||
if fontSize != oldFontSize
|
||||
|
||||
Reference in New Issue
Block a user