miniplayer settings toggle to appear on top of windows.

working on linux, probs working elsewhere reading documentation.
This commit is contained in:
Calum Clark CSM2019 2022-01-24 22:31:57 +00:00
parent 4d6eb2cd64
commit d42976f8db
4 changed files with 18 additions and 1 deletions

View file

@ -60,7 +60,8 @@ export class ConfigStore {
"animated_artwork_qualityLevel": 1, "animated_artwork_qualityLevel": 1,
"bg_artwork_rotation": false, "bg_artwork_rotation": false,
"hw_acceleration": "default", // default, webgpu, disabled "hw_acceleration": "default", // default, webgpu, disabled
"showuserinfo": true "showuserinfo": true,
"miniplayer_ontop": true
}, },
"lyrics": { "lyrics": {
"enable_mxm": false, "enable_mxm": false,

View file

@ -430,6 +430,10 @@ export class Win {
this.win.setMinimumSize(width,height); this.win.setMinimumSize(width,height);
}) })
electron.ipcMain.on("windowontop", (event, ontop) => {
this.win.setAlwaysOnTop(ontop);
});
// Set scale // Set scale
electron.ipcMain.on("windowresize", (event, width, height, lock = false) => { electron.ipcMain.on("windowresize", (event, width, height, lock = false) => {
this.win.setContentSize(width, height); this.win.setContentSize(width, height);

View file

@ -3328,10 +3328,14 @@ const app = new Vue({
ipcRenderer.send('unmaximize'); ipcRenderer.send('unmaximize');
ipcRenderer.send('windowmin', 250, 250) ipcRenderer.send('windowmin', 250, 250)
ipcRenderer.send('windowresize', 300, 300, false) ipcRenderer.send('windowresize', 300, 300, false)
if (this.cfg.visual.miniplayer_ontop) {
ipcRenderer.send('windowontop', true)
}
app.appMode = 'mini'; app.appMode = 'mini';
} else { } else {
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('windowontop', false)
app.appMode = 'player'; app.appMode = 'player';
} }
}, },

View file

@ -524,6 +524,14 @@
</select> </select>
</div> </div>
</div> </div>
<div class="md-option-line">
<div class="md-option-segment">
Miniplayer always on top
</div>
<div class="md-option-segment md-option-segment_auto" >
<input type="checkbox" v-model="app.cfg.visual.miniplayer_ontop" switch/>
</div>
</div>
</div> </div>
<div style="opacity: 0.5; pointer-events: none"> <div style="opacity: 0.5; pointer-events: none">
<div class="md-option-header"> <div class="md-option-header">