git ssb

16+

Dominic / patchbay



Commit de712fa49a4aa44359ffa309191e9195926776f4

change settings from dash nesting to object nesting

mix irving committed on 9/4/2017, 9:21:23 PM
Parent: 57003379961d045ad830d7f296c7d85d38366021

Files changed

app/html/app.jschanged
app/html/app.jsView
@@ -58,24 +58,29 @@
5858
5959 addError(ev.error || ev)
6060 })
6161
62- window.addEventListener('resize', function(e){
63- var wc = electron.remote.getCurrentWebContents()
64- wc && wc.getZoomFactor((zf) => {
65- api.settings.sync.set({
66- 'electron-zoomFactor': zf,
67- 'electron-windowBounds': electron.remote.getCurrentWindow().getBounds()
68- })
69- })
62 + // TODO - extract this to keep patch-lite isolated from electron
63 + window.addEventListener('resize', () => {
64 + var wc = electron.remote.getCurrentWebContents()
65 + wc && wc.getZoomFactor((zf) => {
66 + api.settings.sync.set({
67 + electron: {
68 + zoomFactor: zf,
69 + windowBounds: electron.remote.getCurrentWindow().getBounds()
70 + }
71 + })
72 + })
7073 })
7174
72- var zoomFactor = api.settings.sync.get('electron-zoomFactor')
75 + var zoomFactor = api.settings.sync.get('electron.zoomFactor')
7376 if (zoomFactor)
74- electron.remote.getCurrentWebContents().setZoomFactor(zoomFactor)
75- var bounds = api.settings.sync.get('electron-windowBounds')
77 + electron.remote.getCurrentWebContents().setZoomFactor(zoomFactor)
78 +
79 + var bounds = api.settings.sync.get('electron.windowBounds')
7680 if (bounds)
77- electron.remote.getCurrentWindow().setBounds(bounds)
81 + electron.remote.getCurrentWindow().setBounds(bounds)
82 + ///////////////////
7883
7984 return App
8085 }
8186 }

Built with git-ssb-web