Need help with a couple of things. Gaps in windows and Back Button Position.

So I have a couple of things that are really bugging me right now in a project I am working on:

#1: Gaps in windows. Picture shows what I mean. How do you close these up?

#2: I have no earthly idea how to move this thing with javascript. As you can see in my testing screen it looks horrid right in the center like that. I think it would be good to have a button under items called back or something but if I can move that button near the commands that would be efficient too. (like the picture shows) Can somebody please give me an idea of what I need?

[Pictures deleted due to project canceled]
#1 you can change in rmmz_windows.js
under Window_PartyCommand.prototype.setup, you'd just add this.height = some number.
JavaScript:
Window_PartyCommand.prototype.setup = function() {
    this.refresh();
    this.forceSelect(0);
    this.activate();
    this.height = 115; // added here
    this.open();
};

#2 looks like you can change it in rmmz_scenes.js
under Scene_Battle.prototype.createCancelButton
JavaScript:
Scene_Battle.prototype.createCancelButton = function() {
    this._cancelButton = new Sprite_Button("cancel");
    this._cancelButton.x = Graphics.boxWidth - this._cancelButton.width - 4;
    this._cancelButton.y = this.buttonY();
    this.addWindow(this._cancelButton);
};
The x default position should sit it just 4 px off the right edge of the screen. But based on your screenshot, I'm assuming you're using some kind of plugin that is overwriting this. You might have to go through the plugins and search for "_cancelButton.x"

Otherwise, you should be able to just set this._cancelButton.x = whatever.
Maybe a hard number like 600 (I have no idea what your screen dimensions are)
#1 you can change in rmmz_windows.js
under Window_PartyCommand.prototype.setup, you'd just add this.height = some number.
JavaScript:
Window_PartyCommand.prototype.setup = function() {
    this.refresh();
    this.forceSelect(0);
    this.activate();
    this.height = 115; // added here
    this.open();
};

#2 looks like you can change it in rmmz_scenes.js
under Scene_Battle.prototype.createCancelButton
JavaScript:
Scene_Battle.prototype.createCancelButton = function() {
    this._cancelButton = new Sprite_Button("cancel");
    this._cancelButton.x = Graphics.boxWidth - this._cancelButton.width - 4;
    this._cancelButton.y = this.buttonY();
    this.addWindow(this._cancelButton);
};
The x default position should sit it just 4 px off the right edge of the screen. But based on your screenshot, I'm assuming you're using some kind of plugin that is overwriting this. You might have to go through the plugins and search for "_cancelButton.x"

Otherwise, you should be able to just set this._cancelButton.x = whatever.
Maybe a hard number like 600 (I have no idea what your screen dimensions are)
This was very helpful, thank you. I will take a look at it in a little bit.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-a-couple-of-things-gaps-in-windows-and-back-button-position.150372/