Resizable UV editor in sidebars, square by default

Closes #2471
This commit is contained in:
JannisX11 2024-09-14 14:04:08 +02:00
parent 930935a6eb
commit 06fd67e0fe

View File

@ -2212,6 +2212,7 @@ Interface.definePanels(function() {
float_size: [500, 600],
height: 500
},
resizable: true,
toolbars: [
new Toolbar('uv_editor', {
children: [
@ -2405,8 +2406,8 @@ Interface.definePanels(function() {
if (panel) this.height -= panel.height;
}
} else if (Panels.uv.slot.includes('_bar')) {
this.height = size * Math.clamp(this.uv_resolution[1] / this.uv_resolution[0], 0.5, 1);
} else if (Panels.uv.slot.includes('_bar') && !UVEditor.panel.fixed_height) {
this.height = size;
} else {
this.height = Math.clamp(