Skip to content

Commit

Permalink
Fix edit theme dialog layout again
Browse files Browse the repository at this point in the history
Ensures that the layout looks better and doesn't get out of place in the
smallest windows and largest fonts, as well as in both English and
Chinese environments.
  • Loading branch information
3gf8jv4dv committed Dec 19, 2024
1 parent db8ad1e commit 6031d71
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
"theme_edit_modal__pick_color": "Choose color",
"theme_edit_modal__pick_last_color": "Use previous color",
"theme_edit_modal__pick_save": "Confirm",
"theme_edit_modal__preview": "Preview Theme",
"theme_edit_modal__preview": "Preview",
"theme_edit_modal__primary": "Theme Color",
"theme_edit_modal__remove": "Remove",
"theme_edit_modal__remove_tip": "Do you really want to remove this theme?",
Expand Down
33 changes: 29 additions & 4 deletions src/renderer/views/Setting/components/ThemeEditModal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@
<!-- <div :class="$style.note">
<p>{{ $t('theme_selector_modal__title_tip') }}</p>
</div> -->
<div :class="$style.footer">
<div :class="$style.footerChkBox">
<div :class="$style.subContent">
<base-input v-model="themeName" :class="$style.input" :placeholder="$t('theme_selector_modal__theme_name')" />
<base-checkbox id="theme_edit_modal__dark" v-model="isDark" :class="$style.checkbox" :label="$t('theme_edit_modal__dark')" @change="handleDark" />
<base-checkbox id="theme_edit_modal__dark_font" v-model="isDarkFont" :class="$style.checkbox" :label="$t('theme_edit_modal__dark_font')" @change="handleDarkFont" />
<base-checkbox id="theme_edit_modal__preview" v-model="preview" :class="$style.checkbox" :label="$t('theme_edit_modal__preview')" @change="handlePreview" />
</div>
</div>
<div :class="$style.footer">
<div :class="$style.subContent">
<base-input v-model="themeName" :class="$style.input" :placeholder="$t('theme_selector_modal__theme_name')" />
</div>
<div :class="$style.subContent">
<base-btn v-if="themeId" :class="$style.btn" @click="handleRemove">{{ $t('theme_edit_modal__remove') }}</base-btn>
<base-btn v-if="themeId" :class="$style.btn" @click="handleSaveNew">{{ $t('theme_edit_modal__save_new') }}</base-btn>
Expand Down Expand Up @@ -766,11 +770,32 @@ export default {
// }
// }
}
.footer {
.footerChkBox {
padding: 15px;
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: right;
gap: 15px;
font-size: 14px;
.subContent {
display: flex;
flex-flow: row nowrap;
align-items: center;
gap: 15px;
}
.checkbox {
flex: none;
}
}
.footer {
padding: 15px;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
gap: 15px;
font-size: 14px;
Expand All @@ -785,7 +810,7 @@ export default {
flex: none;
}
.input {
min-width: 0;
max-width: 140px;
flex: 0 1 auto;
}
}
Expand Down

0 comments on commit 6031d71

Please sign in to comment.