diff --git a/module/actor-creature-sheet.js b/module/actor-creature-sheet.js index 6e817b2d..0ebbd63d 100644 --- a/module/actor-creature-sheet.js +++ b/module/actor-creature-sheet.js @@ -70,17 +70,6 @@ export class RdDActorCreatureSheet extends RdDActorSheet { }); } - /* -------------------------------------------- */ - - /** @override */ - setPosition(options = {}) { - const position = super.setPosition(options); - const sheetBody = this.element.find(".sheet-body"); - const bodyHeight = position.height - 192; - sheetBody.css("height", bodyHeight); - return position; - } - /* -------------------------------------------- */ /** @override */ _updateObject(event, formData) { diff --git a/module/actor-entite-sheet.js b/module/actor-entite-sheet.js index 93888936..8508c7ee 100644 --- a/module/actor-entite-sheet.js +++ b/module/actor-entite-sheet.js @@ -132,10 +132,12 @@ export class RdDActorEntiteSheet extends ActorSheet { /* -------------------------------------------- */ /** @override */ - setPosition(options={}) { + setPosition(options = {}) { const position = super.setPosition(options); + const sheetHeader = this.element.find(".sheet-header"); + const sheetTabs = this.element.find(".sheet-tabs"); const sheetBody = this.element.find(".sheet-body"); - const bodyHeight = position.height - 192; + const bodyHeight = position.height - sheetHeader[0].clientHeight - sheetTabs[0].clientHeight; sheetBody.css("height", bodyHeight); return position; } diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 4e6d70d2..4b5fe567 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -608,8 +608,10 @@ export class RdDActorSheet extends ActorSheet { /** @override */ setPosition(options = {}) { const position = super.setPosition(options); + const sheetHeader = this.element.find(".sheet-header"); + const sheetTabs = this.element.find(".sheet-tabs"); const sheetBody = this.element.find(".sheet-body"); - const bodyHeight = position.height - 192; + const bodyHeight = position.height - sheetHeader[0].clientHeight - sheetTabs[0].clientHeight; sheetBody.css("height", bodyHeight); return position; } diff --git a/module/actor-vehicule-sheet.js b/module/actor-vehicule-sheet.js index 21c90ea5..21143b19 100644 --- a/module/actor-vehicule-sheet.js +++ b/module/actor-vehicule-sheet.js @@ -108,10 +108,12 @@ export class RdDActorVehiculeSheet extends ActorSheet { /* -------------------------------------------- */ /** @override */ - setPosition(options={}) { + setPosition(options = {}) { const position = super.setPosition(options); + const sheetHeader = this.element.find(".sheet-header"); + const sheetTabs = this.element.find(".sheet-tabs"); const sheetBody = this.element.find(".sheet-body"); - const bodyHeight = position.height - 192; + const bodyHeight = position.height - sheetHeader[0].clientHeight - sheetTabs[0].clientHeight; sheetBody.css("height", bodyHeight); return position; } diff --git a/styles/simple.css b/styles/simple.css index e1a80db1..7f6d085e 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -322,6 +322,12 @@ table {border: 1px solid #7a7971;} height: 100%; } +.sheet .window-content {overflow: hidden;} +.sheet .window-content .sheet-header {overflow: hidden;} +.sheet .window-content .sheet-tabs {overflow: hidden;} +.sheet .window-content .sheet-body {overflow-y: scroll;} +.sheet .window-content .sheet-body .tab {padding-bottom: 30px;} + .editor { border: 2; height: 300px;