Skip to content

Commit

Permalink
Fixed bottom bar and better styling
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Apr 26, 2021
1 parent e59b10d commit 73390f0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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"
}
9 changes: 4 additions & 5 deletions modules/feature/minimize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]');
Expand Down Expand Up @@ -39,7 +39,6 @@ export default class MinimalUIMinimize {
break;
}
case 'bottomBar': {
maxPosition += maxPosition > 0 ? MinimalUIMinimize.cssMinimizedSize : MinimalUIMinimize.cssBottomBarLeftStart;
rootStyle.setProperty('--minimw', maxPosition + 'px');
break;
}
Expand Down Expand Up @@ -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'));
Expand Down Expand Up @@ -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 = $(`<div id="minimized-bar" class="app"></div>`).hide();
minimizedBar.appendTo('body');
MinimalUIMinimize.refreshMinimizeBar();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions styles/feature/minimize.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 73390f0

Please sign in to comment.