修复虚拟窗口可能为透明背景的BUG
This commit is contained in:
parent
9b3b785ac6
commit
d1ef26e2ae
|
@ -554,7 +554,8 @@ export default class ClientConnection {
|
|||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number
|
||||
height: number,
|
||||
limit: boolean = true
|
||||
) {
|
||||
this.ws?.send(
|
||||
JSON.stringify(
|
||||
|
@ -563,7 +564,8 @@ export default class ClientConnection {
|
|||
x,
|
||||
y,
|
||||
width,
|
||||
height
|
||||
height,
|
||||
limit
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
|
||||
<q-card-section style="max-height: 50vh; width: 35vw" class="scroll">
|
||||
<q-list>
|
||||
<q-item>
|
||||
<q-item v-if="false">
|
||||
<q-item-section>
|
||||
{{ $t("product name") }}: {{ $t("TV splicing box") }}
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item>
|
||||
<q-item v-if="false">
|
||||
<q-item-section>
|
||||
{{ $t("copyright") }}: {{ $t("guangdong chuangxian jishu") }} LTD.
|
||||
</q-item-section>
|
||||
|
|
|
@ -3,6 +3,8 @@ import { SignalSourceEntity } from "./SignalSourceEntity";
|
|||
import { StringKeyValueEntity } from "./StringKeyValueEntity";
|
||||
import { Protocol } from "./WSProtocol";
|
||||
|
||||
import window_color_list from "../store/window_color_list.js";
|
||||
|
||||
export class MultimediaWindowEntity extends BaseEntity {
|
||||
x: number = 0;
|
||||
y: number = 0;
|
||||
|
@ -45,5 +47,7 @@ export class WindowOpenNotifyEntity extends MultimediaWindowEntity {
|
|||
/** 轮询时的属性,不轮询时无效 */
|
||||
polling_window_type: string = "EWindowType::Normal";
|
||||
|
||||
client_color: string = "";
|
||||
client_color: string = window_color_list.length
|
||||
? window_color_list[Math.round(Math.random() * window_color_list.length)]
|
||||
: "blue";
|
||||
}
|
||||
|
|
|
@ -628,12 +628,15 @@ export namespace Protocol {
|
|||
y: number = 0;
|
||||
width: number = 0;
|
||||
height: number = 0;
|
||||
limit: boolean = true;
|
||||
|
||||
constructor(
|
||||
window_id: number,
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number
|
||||
height: number,
|
||||
limit: boolean = true
|
||||
) {
|
||||
super();
|
||||
this.command = Commands.kSetWindowGeometry;
|
||||
|
@ -642,6 +645,7 @@ export namespace Protocol {
|
|||
this.y = y ?? 0;
|
||||
this.width = width ?? 0;
|
||||
this.height = height ?? 0;
|
||||
this.limit = limit ?? 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -338,10 +338,12 @@ export default store(function (/* { ssrContext } */) {
|
|||
}
|
||||
for (const window of state.windows) {
|
||||
if (window) {
|
||||
try {
|
||||
window.client_color = window_color_list.splice(
|
||||
Math.round(Math.random() * window_color_list.length),
|
||||
1
|
||||
)[0];
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -352,11 +354,12 @@ export default store(function (/* { ssrContext } */) {
|
|||
},
|
||||
pushWindow(state: StateInterface, playload?: WindowOpenNotifyEntity) {
|
||||
if (playload) {
|
||||
try {
|
||||
playload.client_color = window_color_list.splice(
|
||||
Math.round(Math.random() * window_color_list.length),
|
||||
1
|
||||
)[0];
|
||||
|
||||
} catch {}
|
||||
state.windows.push(playload);
|
||||
state.windows_sort.push(playload.uuid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue