Hauteur des fenêtre 'fit-content'

Evite d'avoir tout le temps des tailles mal ajustées
This commit is contained in:
Vincent Vandemeulebrouck 2022-11-16 02:46:26 +01:00
parent 64320fc260
commit 1e5a99e009
14 changed files with 18 additions and 20 deletions

View File

@ -2349,7 +2349,7 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, rollData, const dialog = await RdDRoll.create(this, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html', 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 close: html => { this.currentTMR.maximize() } // Re-display TMR
}, },
{ {
@ -2674,7 +2674,7 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, artData, const dialog = await RdDRoll.create(this, artData,
{ {
html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`, html: `systems/foundryvtt-reve-de-dragon/templates/dialog-roll-${oeuvre.type}.html`,
options: { height: 500, } options: { height: 'fit-content', }
}, },
{ {
name: `jet-${artData.art}`, name: `jet-${artData.art}`,
@ -2814,7 +2814,7 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, meditationData, const dialog = await RdDRoll.create(this, meditationData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html', html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-meditation.html',
options: { height: 575, } options: { height: 'fit-content', }
}, },
{ {
name: 'jet-meditation', name: 'jet-meditation',
@ -2891,7 +2891,7 @@ export class RdDActor extends Actor {
const dialog = await RdDRoll.create(this, rollData, const dialog = await RdDRoll.create(this, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-signedraconique.html', 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 close: html => { this.currentTMR.maximize() } // Re-display TMR
}, },
{ {

View File

@ -49,7 +49,7 @@ export class DialogItemAchat extends Dialog {
constructor(html, venteData) { constructor(html, venteData) {
const isConsommable = venteData.item.type == 'nourritureboisson' && venteData.acheteur?.isPersonnage(); 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 actionAchat = venteData.prixLot > 0 ? "Acheter" : "Prendre";
const buttons = {}; const buttons = {};

View File

@ -9,7 +9,7 @@ export class DialogConsommer extends Dialog {
} }
constructor(actor, item, consommerData, html, onActionItem = async ()=>{}) { 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 = { let conf = {
title: consommerData.title, title: consommerData.title,
content: html, content: html,

View File

@ -24,7 +24,7 @@ export class DialogItemVente extends Dialog {
} }
constructor(venteData, html, callback) { 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 = { let conf = {
title: "Proposer", title: "Proposer",

View File

@ -23,7 +23,7 @@ export class DialogStress extends Dialog {
constructor(dialogData, html) { constructor(dialogData, html) {
const options = { classes: ["DialogStress"], const options = { classes: ["DialogStress"],
width: 400, width: 400,
height: 205+dialogData.actors.length*25, height: 'fit-content',
'z-index': 99999 'z-index': 99999
}; };
const conf = { const conf = {

View File

@ -218,7 +218,7 @@ export class RdDCommands {
buttons: {}, buttons: {},
}, },
{ {
width: 600, height: 500, width: 600, height: 600,
}); });
d.render(true); d.render(true);

View File

@ -92,8 +92,7 @@ export class RdDPossession {
const dialog = await RdDRoll.create(defender, rollData, const dialog = await RdDRoll.create(defender, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-defense-possession.html', html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-defense-possession.html'
options: { height: 450 }
}, },
{ {
name: 'conjurer', name: 'conjurer',
@ -134,8 +133,7 @@ export class RdDPossession {
const dialog = await RdDRoll.create(attacker, rollData, const dialog = await RdDRoll.create(attacker, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html', html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-competence.html'
options: { height: 540 }
}, { }, {
name: 'jet-possession', name: 'jet-possession',
label: rollData.isECNIDefender ? 'Conjurer la possession' : 'Possession', label: rollData.isECNIDefender ? 'Conjurer la possession' : 'Possession',

View File

@ -33,7 +33,7 @@ export class RdDEncaisser extends Dialog {
let dialogOptions = { let dialogOptions = {
classes: ["rdddialog"], classes: ["rdddialog"],
width: 320, width: 320,
height: 260 height: 'fit-content'
} }
// Select proper roll dialog template and stuff // Select proper roll dialog template and stuff

View File

@ -15,7 +15,7 @@ export class RdDRollDialogEthylisme extends Dialog {
default: "rollButton", default: "rollButton",
buttons: { "rollButton": { label: "Test d'éthylisme", callback: html => this.onButton(html) } } 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) super(dialogConf, dialogOptions)
//console.log("ETH", rollData); //console.log("ETH", rollData);

View File

@ -53,7 +53,7 @@ export class RdDRollResolutionTable extends Dialog {
'lancer-fermer': { label: 'Lancer les dés et fermer', callback: html => this.onLancerFermer() } '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; this.rollData = rollData;
} }

View File

@ -29,7 +29,7 @@ export class RdDRoll extends Dialog {
const html = await renderTemplate(dialogConfig.html, rollData); 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) { if (dialogConfig.options) {
mergeObject(options, dialogConfig.options, { overwrite: true }) mergeObject(options, dialogConfig.options, { overwrite: true })
} }

View File

@ -773,7 +773,7 @@ export class RdDTMRDialog extends Dialog {
const dialog = await RdDRoll.create(this.actor, rollData, const dialog = await RdDRoll.create(this.actor, rollData,
{ {
html: 'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-maitrise-tmr.html', 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 close: html => { this.maximize(); } // Re-display TMR
}, },
{ {

View File

@ -21,7 +21,7 @@ export class RdDTMRRencontreDialog extends Dialog {
const dialogOptions = { const dialogOptions = {
classes: ["tmrrencdialog"], classes: ["tmrrencdialog"],
width: 320, height: 240, width: 320, height: 'fit-content',
'z-index': 50 'z-index': 50
} }
super(dialogConf, dialogOptions); super(dialogConf, dialogOptions);

View File

@ -100,7 +100,7 @@ export class StatusEffects extends FormApplication {
mergeObject(options, { mergeObject(options, {
id: "status-effects", id: "status-effects",
template: "systems/foundryvtt-reve-de-dragon/templates/settings/status-effects.html", template: "systems/foundryvtt-reve-de-dragon/templates/settings/status-effects.html",
height: "800", height: 800,
width: 350, width: 350,
minimizable: false, minimizable: false,
closeOnSubmit: true, closeOnSubmit: true,