diff --git a/module/actor.js b/module/actor.js index 91a4714b..bb462a4b 100644 --- a/module/actor.js +++ b/module/actor.js @@ -2349,7 +2349,7 @@ export class RdDActor extends Actor { const dialog = await RdDRoll.create(this, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html', - options: { height: 600 }, + options: { height: 'fit-content' }, close: html => { this.currentTMR.maximize() } // Re-display TMR }, { @@ -2674,7 +2674,7 @@ export class RdDActor extends Actor { const dialog = await RdDRoll.create(this, artData, { html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`, - options: { height: 500, } + options: { height: 'fit-content', } }, { name: `jet-${artData.art}`, @@ -2814,7 +2814,7 @@ export class RdDActor extends Actor { const dialog = await RdDRoll.create(this, meditationData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html', - options: { height: 575, } + options: { height: 'fit-content', } }, { name: 'jet-meditation', @@ -2891,7 +2891,7 @@ export class RdDActor extends Actor { const dialog = await RdDRoll.create(this, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-signedraconique.html', - options: { height: 600 }, + options: { height: 'fit-content' }, close: html => { this.currentTMR.maximize() } // Re-display TMR }, { diff --git a/module/dialog-item-achat.js b/module/dialog-item-achat.js index 1a0c6ef7..b137b5ab 100644 --- a/module/dialog-item-achat.js +++ b/module/dialog-item-achat.js @@ -49,7 +49,7 @@ export class DialogItemAchat extends Dialog { constructor(html, venteData) { const isConsommable = venteData.item.type == 'nourritureboisson' && venteData.acheteur?.isPersonnage(); - let options = { classes: ["dialogachat"], width: 400, height: isConsommable ? 450 : 350, 'z-index': 99999 }; + let options = { classes: ["dialogachat"], width: 400, height: 'fit-content', 'z-index': 99999 }; const actionAchat = venteData.prixLot > 0 ? "Acheter" : "Prendre"; const buttons = {}; diff --git a/module/dialog-item-consommer.js b/module/dialog-item-consommer.js index 7de062c8..81ef25d9 100644 --- a/module/dialog-item-consommer.js +++ b/module/dialog-item-consommer.js @@ -9,7 +9,7 @@ export class DialogConsommer extends Dialog { } constructor(actor, item, consommerData, html, onActionItem = async ()=>{}) { - const options = { classes: ["dialogconsommer"], width: 350, height: 450, 'z-index': 99999 }; + const options = { classes: ["dialogconsommer"], width: 350, height: 'fit-content', 'z-index': 99999 }; let conf = { title: consommerData.title, content: html, diff --git a/module/dialog-item-vente.js b/module/dialog-item-vente.js index 2b2ebdcd..8669e365 100644 --- a/module/dialog-item-vente.js +++ b/module/dialog-item-vente.js @@ -24,7 +24,7 @@ export class DialogItemVente extends Dialog { } constructor(venteData, html, callback) { - let options = { classes: ["dialogvente"], width: 400, height: 300, 'z-index': 99999 }; + let options = { classes: ["dialogvente"], width: 400, height: 'fit-content', 'z-index': 99999 }; let conf = { title: "Proposer", diff --git a/module/dialog-stress.js b/module/dialog-stress.js index 757cb000..24928c01 100644 --- a/module/dialog-stress.js +++ b/module/dialog-stress.js @@ -23,7 +23,7 @@ export class DialogStress extends Dialog { constructor(dialogData, html) { const options = { classes: ["DialogStress"], width: 400, - height: 205+dialogData.actors.length*25, + height: 'fit-content', 'z-index': 99999 }; const conf = { diff --git a/module/rdd-commands.js b/module/rdd-commands.js index a8388a29..d124fedc 100644 --- a/module/rdd-commands.js +++ b/module/rdd-commands.js @@ -218,7 +218,7 @@ export class RdDCommands { buttons: {}, }, { - width: 600, height: 500, + width: 600, height: 600, }); d.render(true); diff --git a/module/rdd-possession.js b/module/rdd-possession.js index e372d56d..1683d435 100644 --- a/module/rdd-possession.js +++ b/module/rdd-possession.js @@ -92,8 +92,7 @@ export class RdDPossession { const dialog = await RdDRoll.create(defender, rollData, { - html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-defense-possession.html', - options: { height: 450 } + html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-defense-possession.html' }, { name: 'conjurer', @@ -134,8 +133,7 @@ export class RdDPossession { const dialog = await RdDRoll.create(attacker, rollData, { - html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html', - options: { height: 540 } + html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html' }, { name: 'jet-possession', label: rollData.isECNIDefender ? 'Conjurer la possession' : 'Possession', diff --git a/module/rdd-roll-encaisser.js b/module/rdd-roll-encaisser.js index b791a5f2..a109b35d 100644 --- a/module/rdd-roll-encaisser.js +++ b/module/rdd-roll-encaisser.js @@ -33,7 +33,7 @@ export class RdDEncaisser extends Dialog { let dialogOptions = { classes: ["rdddialog"], width: 320, - height: 260 + height: 'fit-content' } // Select proper roll dialog template and stuff diff --git a/module/rdd-roll-ethylisme.js b/module/rdd-roll-ethylisme.js index a15d823f..ce7580d4 100644 --- a/module/rdd-roll-ethylisme.js +++ b/module/rdd-roll-ethylisme.js @@ -15,7 +15,7 @@ export class RdDRollDialogEthylisme extends Dialog { default: "rollButton", buttons: { "rollButton": { label: "Test d'éthylisme", callback: html => this.onButton(html) } } }; - let dialogOptions = { classes: ["rdddialog"], width: 400, height: 270, 'z-index': 99999 } + let dialogOptions = { classes: ["rdddialog"], width: 400, height: 'fit-content', 'z-index': 99999 } super(dialogConf, dialogOptions) //console.log("ETH", rollData); diff --git a/module/rdd-roll-resolution-table.js b/module/rdd-roll-resolution-table.js index 91ba953b..f276ede4 100644 --- a/module/rdd-roll-resolution-table.js +++ b/module/rdd-roll-resolution-table.js @@ -53,7 +53,7 @@ export class RdDRollResolutionTable extends Dialog { 'lancer-fermer': { label: 'Lancer les dés et fermer', callback: html => this.onLancerFermer() } } }; - super(conf, { classes: ["rdddialog"], width: 800, height: 800, 'z-index': 99999 }); + super(conf, { classes: ["rdddialog"], width: 800, height: 'fit-content', 'z-index': 99999 }); this.rollData = rollData; } diff --git a/module/rdd-roll.js b/module/rdd-roll.js index efbe8c50..e41587e3 100644 --- a/module/rdd-roll.js +++ b/module/rdd-roll.js @@ -29,7 +29,7 @@ export class RdDRoll extends Dialog { const html = await renderTemplate(dialogConfig.html, rollData); - let options = { classes: ["rdddialog"], width: 600, height: 500, 'z-index': 99999 }; + let options = { classes: ["rdddialog"], width: 600, height: 'fit-content', 'z-index': 99999 }; if (dialogConfig.options) { mergeObject(options, dialogConfig.options, { overwrite: true }) } diff --git a/module/rdd-tmr-dialog.js b/module/rdd-tmr-dialog.js index e5fa7516..40e00a1d 100644 --- a/module/rdd-tmr-dialog.js +++ b/module/rdd-tmr-dialog.js @@ -773,7 +773,7 @@ export class RdDTMRDialog extends Dialog { const dialog = await RdDRoll.create(this.actor, rollData, { html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-maitrise-tmr.html', - options: { height: 420 }, + options: { height: 'fit-content' }, close: html => { this.maximize(); } // Re-display TMR }, { diff --git a/module/rdd-tmr-rencontre-dialog.js b/module/rdd-tmr-rencontre-dialog.js index 72c65558..804dd160 100644 --- a/module/rdd-tmr-rencontre-dialog.js +++ b/module/rdd-tmr-rencontre-dialog.js @@ -21,7 +21,7 @@ export class RdDTMRRencontreDialog extends Dialog { const dialogOptions = { classes: ["tmrrencdialog"], - width: 320, height: 240, + width: 320, height: 'fit-content', 'z-index': 50 } super(dialogConf, dialogOptions); diff --git a/module/settings/status-effects.js b/module/settings/status-effects.js index 6c2146f6..406797bc 100644 --- a/module/settings/status-effects.js +++ b/module/settings/status-effects.js @@ -100,7 +100,7 @@ export class StatusEffects extends FormApplication { mergeObject(options, { id: "status-effects", template: "systems/foundryvtt-reve-de-dragon/templates/settings/status-effects.html", - height: "800", + height: 800, width: 350, minimizable: false, closeOnSubmit: true,