|
@ -29,6 +29,7 @@ import multiSelectReducer from './redux/multiSelectSlice'; |
|
|
import MenuBuilder from './menu'; |
|
|
import MenuBuilder from './menu'; |
|
|
|
|
|
|
|
|
const isWindows = process.platform === 'win32'; |
|
|
const isWindows = process.platform === 'win32'; |
|
|
|
|
|
const isMacOS = process.platform === 'darwin'; |
|
|
|
|
|
|
|
|
export const store = configureStore({ |
|
|
export const store = configureStore({ |
|
|
reducer: { |
|
|
reducer: { |
|
@ -234,6 +235,38 @@ const createWindow = async () => { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (isWindows) { |
|
|
|
|
|
mainWindow.on('resize', () => { |
|
|
|
|
|
const window = mainWindow.getContentBounds(); |
|
|
|
|
|
|
|
|
|
|
|
// Set the current song image as thumbnail
|
|
|
|
|
|
mainWindow.setThumbnailClip({ |
|
|
|
|
|
x: 15, |
|
|
|
|
|
y: mainWindow.getContentSize()[1] - 83, |
|
|
|
|
|
height: 65, |
|
|
|
|
|
width: 65, |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
settings.setSync('windowPosition', { |
|
|
|
|
|
x: window.x, |
|
|
|
|
|
y: window.y, |
|
|
|
|
|
width: window.width, |
|
|
|
|
|
height: window.height, |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
mainWindow.on('moved', () => { |
|
|
|
|
|
const window = mainWindow.getContentBounds(); |
|
|
|
|
|
settings.setSync('windowPosition', { |
|
|
|
|
|
x: window.x, |
|
|
|
|
|
y: window.y, |
|
|
|
|
|
width: window.width, |
|
|
|
|
|
height: window.height, |
|
|
|
|
|
}); |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (isMacOS) { |
|
|
mainWindow.on('resize', () => { |
|
|
mainWindow.on('resize', () => { |
|
|
const window = mainWindow.getContentBounds(); |
|
|
const window = mainWindow.getContentBounds(); |
|
|
|
|
|
|
|
@ -262,6 +295,7 @@ const createWindow = async () => { |
|
|
height: window.height, |
|
|
height: window.height, |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
mainWindow.on('maximize', () => { |
|
|
mainWindow.on('maximize', () => { |
|
|
console.log('entered maximize'); |
|
|
console.log('entered maximize'); |
|
|