diff --git a/CHANGELOG.md b/CHANGELOG.md index 438fe4d..ee9b970 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.6.3 +* Bugfix: Adjusted hotbar (again) and Window Controls support + ### 1.6.2 * Bugfix: Adjusted hotbar positioning and starfinder support diff --git a/module.json b/module.json index 27f985b..41fc55b 100644 --- a/module.json +++ b/module.json @@ -10,7 +10,7 @@ } ], "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", - "version": "1.6.2", + "version": "1.6.3", "compatibility": { "minimum": "10", "verified": "11.302", @@ -49,7 +49,7 @@ ], "url": "https://github.com/saif-ellafi/foundryvtt-minimal-ui.git", "manifest": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/latest/download/module.json", - "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.6.2/foundryvtt-minimal-ui_1.6.2.zip", + "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/download/1.6.3/foundryvtt-minimal-ui_1.6.3.zip", "readme": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/blob/main/README.md", "license": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/blob/main/LICENSE.md", "changelog": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/blob/main/CHANGELOG.md" diff --git a/modules/component/hotbar.js b/modules/component/hotbar.js index 689865e..35ef12d 100644 --- a/modules/component/hotbar.js +++ b/modules/component/hotbar.js @@ -6,16 +6,21 @@ export default class MinimalUIHotbar { static hotbarLocked = false; static cssHotbarHidden = '-50px'; + static cssHotbarAutoHideHeight = '-5px'; + + static cssHotbarWinControlsMod = '35px'; static cssHotbarLeftControlsLineHeight = '24px'; static cssHotbarRightControlsLineHeight = '12px'; static cssHotbarRightControlsLineHeightDnDUi = '10px'; static cssHotbarControlsAutoHideHeight = '100%'; - static cssHotbarAutoHideHeight = '-5px'; static cssHotbarAutoHideShadow = '-1px'; static cssHotbarControlsMargin = '0px'; static cssHotbarCustomHotbarCompatHover = '10px'; + static cssHotbarPlayerBottom = '-5px'; + static cssHotbarPlayerBottomAdj = '55px' + static htmlHotbarLockButton = ` @@ -51,9 +56,9 @@ export default class MinimalUIHotbar { case 'default': { rootStyle.setProperty('--hotbarxpos', (330 - webtrcAdjust)+'px'); if (game.webrtc?.mode === 0 || ui.webrtc?.hidden) - rootStyle.setProperty('--playerbot', '-5px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottom); else - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); break; } case 'extremeLeft': { @@ -61,45 +66,42 @@ export default class MinimalUIHotbar { !(game.modules.get("custom-hotbar")?.active) && availableWidth >= 1200 ) { - if (game.system.id === 'sfrpg') - rootStyle.setProperty('--hotbarxpos', '-93px'); - else - rootStyle.setProperty('--hotbarxpos', '-102px'); + rootStyle.setProperty('--hotbarxpos', '8px'); if (!(game.modules.get('sidebar-macros')?.active && game.settings.get('sidebar-macros', 'hideMacroHotbar'))) - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); } break; } case 'left': { rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5) - (availableWidth / 9) - (availableWidth / 9) - webtrcAdjust) + 'px'); if (game.webrtc?.mode === 0 || ui.webrtc?.hidden) - rootStyle.setProperty('--playerbot', '-5px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottom); else - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); break; } case 'center': { rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5) - (availableWidth / 9) - webtrcAdjust) + 'px'); if (game.webrtc?.mode === 0 || ui.webrtc?.hidden) - rootStyle.setProperty('--playerbot', '-5px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottom); else - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); break; } case 'right': { rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5) - webtrcAdjust) + 'px'); if (game.webrtc?.mode === 0 || ui.webrtc?.hidden) - rootStyle.setProperty('--playerbot', '-5px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottom); else - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); break; } case 'manual': { rootStyle.setProperty('--hotbarxpos', (game.settings.get('minimal-ui', 'hotbarPixelPosition') - webtrcAdjust) + 'px'); if (game.webrtc?.mode === 0 || ui.webrtc?.hidden) - rootStyle.setProperty('--playerbot', '-5px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottom); else - rootStyle.setProperty('--playerbot', '55px'); + rootStyle.setProperty('--playerbot', MinimalUIHotbar.cssHotbarPlayerBottomAdj); break; } } @@ -107,7 +109,11 @@ export default class MinimalUIHotbar { } static configureHotbar() { - if (game.settings.get('minimal-ui', 'hotbar') === 'autohide') { + if (game.modules.get('window-controls')?.active && + game.settings.get('window-controls', 'organizedMinimize') === 'persistentBottom') { + rootStyle.setProperty('--hotbarypos', MinimalUIHotbar.cssHotbarWinControlsMod); + rootStyle.setProperty('--hotbarhv', MinimalUIHotbar.cssHotbarWinControlsMod); + } else if (game.settings.get('minimal-ui', 'hotbar') === 'autohide') { if (!(game.modules.get("custom-hotbar")?.active || game.modules.get('monks-hotbar-expansion')?.active)) { rootStyle.setProperty('--hotbarypos', MinimalUIHotbar.cssHotbarHidden); rootStyle.setProperty('--hotbarlh1', MinimalUIHotbar.cssHotbarLeftControlsLineHeight); diff --git a/package-lock.json b/package-lock.json index d9dc278..48d2d1c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "foundryvtt-minimal-ui", - "version": "1.5.4", + "version": "1.6.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "foundryvtt-minimal-ui", - "version": "1.5.4", + "version": "1.6.3", "license": "MIT", "dependencies": { "@rollup/plugin-json": "^4.1.0", @@ -839,7 +839,7 @@ } }, "node_modules/tar-stream": { - "version": "1.6.2", + "version": "1.6.3", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", "dev": true, diff --git a/package.json b/package.json index bf30ec5..82fb257 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foundryvtt-minimal-ui", - "version": "1.6.2", + "version": "1.6.3", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", "main": "minimalui.js", "scripts": { diff --git a/styles/component/hotbar.css b/styles/component/hotbar.css index 595be8c..332caa5 100644 --- a/styles/component/hotbar.css +++ b/styles/component/hotbar.css @@ -22,7 +22,7 @@ visibility: var(--hotbarvis); transition: 0.5s ease-out 0.5s; opacity: var(--opacity); - position: relative; + position: fixed; } #hotbar .bar-controls {