Merge pull request #992 from ace-beattie/develop
Move to original location on miniplayer close, and vice versa.
This commit is contained in:
commit
36699b5b3e
2 changed files with 15 additions and 0 deletions
|
@ -1043,6 +1043,11 @@ export class BrowserWindow {
|
||||||
BrowserWindow.win.setResizable(!lock);
|
BrowserWindow.win.setResizable(!lock);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Move window
|
||||||
|
ipcMain.on("windowmove", (_event, x, y) => {
|
||||||
|
BrowserWindow.win.setBounds({x, y});
|
||||||
|
});
|
||||||
|
|
||||||
//Fullscreen
|
//Fullscreen
|
||||||
ipcMain.on('setFullScreen', (_event, flag) => {
|
ipcMain.on('setFullScreen', (_event, flag) => {
|
||||||
BrowserWindow.win.setFullScreen(flag)
|
BrowserWindow.win.setFullScreen(flag)
|
||||||
|
|
|
@ -148,6 +148,10 @@ const app = new Vue({
|
||||||
},
|
},
|
||||||
tmpHeight: '',
|
tmpHeight: '',
|
||||||
tmpWidth: '',
|
tmpWidth: '',
|
||||||
|
tmpX: '',
|
||||||
|
tmpY: '',
|
||||||
|
miniTmpX: '',
|
||||||
|
miniTmpY: '',
|
||||||
tmpVar: [],
|
tmpVar: [],
|
||||||
notification: false,
|
notification: false,
|
||||||
chrome: {
|
chrome: {
|
||||||
|
@ -4109,13 +4113,19 @@ const app = new Vue({
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.tmpWidth = window.innerWidth;
|
this.tmpWidth = window.innerWidth;
|
||||||
this.tmpHeight = window.innerHeight;
|
this.tmpHeight = window.innerHeight;
|
||||||
|
this.tmpX = window.screenX;
|
||||||
|
this.tmpY = window.screenY;
|
||||||
ipcRenderer.send('unmaximize');
|
ipcRenderer.send('unmaximize');
|
||||||
ipcRenderer.send('windowmin', 250, 250)
|
ipcRenderer.send('windowmin', 250, 250)
|
||||||
|
if (this.miniTmpX !== '' && this.miniTmpY !== '') ipcRenderer.send('windowmove', this.miniTmpX, this.miniTmpY)
|
||||||
ipcRenderer.send('windowresize', 300, 300, false)
|
ipcRenderer.send('windowresize', 300, 300, false)
|
||||||
app.appMode = 'mini';
|
app.appMode = 'mini';
|
||||||
} else {
|
} else {
|
||||||
|
this.miniTmpX = window.screenX;
|
||||||
|
this.miniTmpY = window.screenY;
|
||||||
ipcRenderer.send('windowmin', 844, 410)
|
ipcRenderer.send('windowmin', 844, 410)
|
||||||
ipcRenderer.send('windowresize', this.tmpWidth, this.tmpHeight, false)
|
ipcRenderer.send('windowresize', this.tmpWidth, this.tmpHeight, false)
|
||||||
|
ipcRenderer.send('windowmove', this.tmpX, this.tmpY)
|
||||||
ipcRenderer.send('windowontop', false)
|
ipcRenderer.send('windowontop', false)
|
||||||
//this.cfg.visual.miniplayer_top_toggle = true;
|
//this.cfg.visual.miniplayer_top_toggle = true;
|
||||||
app.appMode = 'player';
|
app.appMode = 'player';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue