feature: Add support to autoHide the menubar and showing it with the key. fixes #188

This commit is contained in:
Rick van Lieshout 2023-01-20 22:15:36 +01:00
parent 3a4d23738f
commit 63ccff97ea
4 changed files with 12 additions and 10 deletions

View File

@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## 4.4.0
- Updated shortcut hint on the menubar to reflect the new `ctrl+=` shortcut.
- Reverted icon path to `icon.png` instead of the hardcoded linux path
- Reverted icon path to `icon.png` instead of the hardcoded linux path.
- Add support to autoHide the menubar and showing it with the `alt` key.
## 4.3.1

View File

@ -49,7 +49,10 @@ function setFlags() {
*
*/
function syncMenuBarWithStore() {
mainWindow.setMenuBarVisibility(store.get(settings.menuBar));
const fixedMenuBar = store.get(settings.menuBar);
mainWindow.autoHideMenuBar = !fixedMenuBar;
mainWindow.setMenuBarVisibility(fixedMenuBar);
}
/**
@ -78,6 +81,7 @@ function createWindow(options = {}) {
height: store && store.get(settings.windowBounds.height),
icon,
backgroundColor: options.backgroundColor,
autoHideMenuBar: true,
webPreferences: {
preload: path.join(__dirname, "preload.js"),
plugins: true,

View File

@ -68,8 +68,8 @@
<p class="group__title">UI</p>
<div class="group__option">
<div class="group__description">
<h4>Menubar</h4>
<p>Show TIDAL Hi-Fi's menu bar.</p>
<h4>Fixed menubar</h4>
<p>Always show TIDAL Hi-Fi's menu bar.</p>
</div>
<label class="switch">
<input id="menuBar" type="checkbox">

View File

@ -345,11 +345,8 @@ setInterval(function () {
"app-name": appName,
};
const titleOrArtistChanged = currentSong !== songDashArtistTitle;
// update title, url and play info with new info
setTitle(songDashArtistTitle);
getTrackURL();