From 73390f0f6eb226908709c9a4b44e191afeb8c1e1 Mon Sep 17 00:00:00 2001 From: Saif Addin Date: Mon, 26 Apr 2021 18:01:49 +0200 Subject: [PATCH] Fixed bottom bar and better styling --- CHANGELOG.md | 3 +++ module.json | 4 ++-- modules/feature/minimize.js | 9 ++++----- package.json | 2 +- styles/feature/minimize.css | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8576cca..8dba77a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 0.8.7 +* Bugfix: Fixed styling issues with Minimized bottom bar + ### 0.8.6 * Enhancement: Organized Minimized Bar now takes only necessary amount of space * Enhancement: Better looking minimized windows with Minimal UI colorset diff --git a/module.json b/module.json index 9f4d102..7ab98d2 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "title": "Minimal UI", "author": "JeansenVaars#2857", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", - "version": "0.8.6", + "version": "0.8.7", "minimumCoreVersion": "0.7.9", "compatibleCoreVersion": "0.7.9", "dependencies": [ @@ -26,5 +26,5 @@ ], "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/latest/download/foundryvtt-minimal-ui_0.8.6.zip" + "download": "https://github.com/saif-ellafi/foundryvtt-minimal-ui/releases/latest/download/foundryvtt-minimal-ui_0.8.7.zip" } diff --git a/modules/feature/minimize.js b/modules/feature/minimize.js index 1c1ee96..5e0b890 100644 --- a/modules/feature/minimize.js +++ b/modules/feature/minimize.js @@ -5,8 +5,8 @@ export default class MinimalUIMinimize { static minimizedStash = {}; static cssMinimizedSize = 150; - static cssTopBarLeftStart = 5; - static cssBottomBarLeftStart = 200; + static cssTopBarLeftStart = 8; + static cssBottomBarLeftStart = 160; static fixMinimizedRule(rule, measure) { let stylesheet = document.querySelector('link[href*=minimalui]'); @@ -39,7 +39,6 @@ export default class MinimalUIMinimize { break; } case 'bottomBar': { - maxPosition += maxPosition > 0 ? MinimalUIMinimize.cssMinimizedSize : MinimalUIMinimize.cssBottomBarLeftStart; rootStyle.setProperty('--minimw', maxPosition + 'px'); break; } @@ -160,7 +159,7 @@ export default class MinimalUIMinimize { libWrapper.register('minimal-ui', 'Application.prototype.minimize', async function (wrapped, ...args) { const minimizedSetting = game.settings.get('minimal-ui', 'organizedMinimize'); - const minGap = ['top', 'topBar'].includes(minimizedSetting) ? MinimalUIMinimize.cssTopBarLeftStart + 10 : MinimalUIMinimize.cssBottomBarLeftStart; + const minGap = ['top', 'topBar'].includes(minimizedSetting) ? MinimalUIMinimize.cssTopBarLeftStart + 10 : MinimalUIMinimize.cssBottomBarLeftStart + 10; const sidebarGap = MinimalUIMinimize.cssMinimizedSize * 4; const jumpGap = MinimalUIMinimize.cssMinimizedSize + 10; const boardSize = parseInt($("#board").css('width')); @@ -229,7 +228,7 @@ export default class MinimalUIMinimize { case 'bottomBar': { rootStyle.setProperty('--minimbot', '70px'); rootStyle.setProperty('--minimtop', 'unset'); - rootStyle.setProperty('--minileft', '180px'); + rootStyle.setProperty('--minileft', MinimalUIMinimize.cssBottomBarLeftStart + 'px'); const minimizedBar = $(`
`).hide(); minimizedBar.appendTo('body'); MinimalUIMinimize.refreshMinimizeBar(); diff --git a/package.json b/package.json index 4f85b72..43380c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "foundryvtt-minimal-ui", - "version": "0.8.6", + "version": "0.8.7", "description": "Minimal UI allows customizing Foundry interface, by hiding, collapsing or resizing specific parts.", "main": "minimalui.js", "scripts": { diff --git a/styles/feature/minimize.css b/styles/feature/minimize.css index b58e5b5..82ceeb6 100644 --- a/styles/feature/minimize.css +++ b/styles/feature/minimize.css @@ -13,10 +13,10 @@ top: var(--minimtop); border-radius: 5px; left: var(--minileft); - opacity: 40%; + opacity: 50%; transition: 0.2s; border: 1px solid var(--bordercolor); - box-shadow: 3px 0 var(--shadowstrength) 0 var(--shadowcolor); + box-shadow: 0 0 var(--shadowstrength) 0 var(--shadowcolor); } .window-app.minimized .window-header {