Skip to content

Commit a594dfd

Browse files
committed
Fix blocking messages and dialogs centering
1 parent 22c63e6 commit a594dfd

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

src/renderer/src/components/OpenCOR.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
2-
<BlockUI ref="blockUi" class="opencor overflow-hidden h-full"
2+
<BlockUI ref="blockUi"
3+
class="opencor overflow-hidden h-full"
4+
:class="showMainMenu ? 'with-main-menu' : ''"
35
:blocked="compBlockUiEnabled"
46
@click="activateInstance"
57
@focus="activateInstance"
@@ -21,7 +23,7 @@
2123
>
2224
<input ref="files" type="file" multiple style="display: none;" @change="onChange" />
2325
<DragNDropComponent v-show="dragAndDropCounter" />
24-
<MainMenu :id="mainMenuId" v-if="!electronApi && !omex"
26+
<MainMenu :id="mainMenuId" v-if="showMainMenu"
2527
:isActive="compIsActive"
2628
:uiEnabled="compUiEnabled"
2729
:hasFiles="hasFiles"
@@ -159,6 +161,10 @@ const compIsActive = vue.computed(() => {
159161
return activeInstanceUid.value === crtInstanceUid;
160162
});
161163
164+
const showMainMenu = vue.computed(() => {
165+
return !electronApi && !props.omex;
166+
});
167+
162168
// Determine whether the component UI should be blocked/enabled.
163169
// Note: compBlockUiEnabled is used to determine whether PrimeVue's BlockUI component should be enabled, whereas
164170
// compUiEnabled is used to determine whether the UI should be enabled (it checks whether various dialogs are
@@ -1229,6 +1235,15 @@ const onGitHubButtonClick = async (): Promise<void> => {
12291235
color: var(--p-red-700);
12301236
}
12311237
1238+
.with-main-menu {
1239+
:deep(.p-dialog-mask) {
1240+
padding-top: 28px !important;
1241+
}
1242+
:deep(.p-message) {
1243+
margin-top: 14px !important;
1244+
}
1245+
}
1246+
12321247
@media (prefers-color-scheme: dark) {
12331248
.connected-to-github,
12341249
:deep(.connected-to-github .pi-github) {

0 commit comments

Comments
 (0)