Skip to content

Commit

Permalink
Fix repositioning before refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
saif-ellafi committed Dec 27, 2021
1 parent 9170a05 commit 77baa9f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 1.4.1 (WIP)
* Bugfix: Put back players panel if switching hotbar position other than to extreme left without need to refresh

### 1.4.0
* Enhancement: Achieve a new level of minimalism with new Minimal UI defaults and settings
* Enhancement: New Hotbar Setting "Extreme Left" (Default) position for Macro, pushes the players list above it
Expand Down
5 changes: 5 additions & 0 deletions modules/component/hotbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class MinimalUIHotbar {
switch (game.settings.get('minimal-ui', 'hotbarPosition')) {
case 'default': {
rootStyle.setProperty('--hotbarxpos', '220px');
rootStyle.setProperty('--playerbot', '-8px');
break;
}
case 'extremeLeft': {
Expand All @@ -58,18 +59,22 @@ export default class MinimalUIHotbar {
}
case 'left': {
rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5) - (availableWidth / 9) - (availableWidth / 9)) + 'px');
rootStyle.setProperty('--playerbot', '-8px');
break;
}
case 'center': {
rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5) - (availableWidth / 9)) + 'px');
rootStyle.setProperty('--playerbot', '-8px');
break;
}
case 'right': {
rootStyle.setProperty('--hotbarxpos', ((availableWidth / 2.5)) + 'px');
rootStyle.setProperty('--playerbot', '-8px');
break;
}
case 'manual': {
rootStyle.setProperty('--hotbarxpos', game.settings.get('minimal-ui', 'hotbarPixelPosition') + 'px');
rootStyle.setProperty('--playerbot', '-8px');
break;
}
}
Expand Down

0 comments on commit 77baa9f

Please sign in to comment.