优霸定制VideoWall宫格横屏竖屏成比例显示

about菜单从工具栏other移动到system
system增加user
This commit is contained in:
fangxiang 2022-11-28 14:10:07 +08:00
parent 0c7ebfa2ba
commit 516a7da419
1 changed files with 14 additions and 11 deletions

View File

@ -320,10 +320,13 @@ export default defineComponent({
return result;
};
const refreshPreiewGridWH = () => {
const refreshPreviewGridWH = () => {
if (preview_grid.value) {
const max_height = window.innerHeight * 0.49; // items-center justify-center
const max_width = preview_grid.value.clientWidth * 0.95;
let max_height = window.innerHeight * 0.49; // items-center justify-center
let max_width = preview_grid.value.clientWidth * 0.95;
max_width = (max_width - preview_cols.value) & ~preview_cols.value;
max_height = (max_height - preview_rows.value) & ~preview_rows.value;
let cell_width = 0;
let cell_height = 0;
if (screen_mode.value == 0) {
@ -336,16 +339,16 @@ export default defineComponent({
} else {
cell_height = max_height / preview_rows.value;
if (preview_cols.value == 1 && preview_rows.value == 4) {
cell_width = (cell_height * 18) / 16;
cell_width = (cell_height * 16) / 16;
} else {
cell_width = (cell_height * 13) / 16;
cell_width = (cell_height * 12) / 16;
}
if (cell_width * preview_cols.value > max_width) {
cell_width = max_width / preview_cols.value;
if (preview_cols.value == 1 && preview_rows.value == 4) {
cell_height = (cell_width * 16) / 18;
cell_height = (cell_width * 16) / 16;
} else {
cell_height = (cell_width * 16) / 13;
cell_height = (cell_width * 16) / 12;
}
}
}
@ -363,7 +366,7 @@ export default defineComponent({
preview_rows.value = result.rows;
preview_rotation.value = result.rotation;
refreshPreiewGridWH();
refreshPreviewGridWH();
}
);
@ -374,13 +377,13 @@ export default defineComponent({
const result = parseSpliceMode(splice_mode.value);
splice_mode.value = result.rows + "x" + result.cols;
}
refreshPreiewGridWH();
refreshPreviewGridWH();
}
);
EventBus.getInstance().on(
EventNamesDefine.WindowResize,
refreshPreiewGridWH
refreshPreviewGridWH
);
return {
@ -463,7 +466,7 @@ export default defineComponent({
}
nextTick(() => {
refreshPreiewGridWH();
refreshPreviewGridWH();
});
show_dialog.value = true;
},