Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

選択中のキャラが一番上に表示されるようにした #1176

Merged
merged 9 commits into from
Feb 5, 2023
17 changes: 16 additions & 1 deletion src/components/CharacterButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
transition-show="none"
transition-hide="none"
>
<q-list style="min-width: max-content">
<q-list style="min-width: max-content" class="item-container">
tunamaguro marked this conversation as resolved.
Show resolved Hide resolved
<q-item
v-if="selectedStyleInfo == undefined && !emptiable"
class="row no-wrap items-center"
Expand Down Expand Up @@ -57,6 +57,12 @@
v-for="(characterInfo, characterIndex) in characterInfos"
:key="characterIndex"
class="q-pa-none"
:class="
selectedCharacter != undefined &&
characterInfo.metas.speakerUuid ===
selectedCharacter.metas.speakerUuid &&
'selected-row'
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
"
>
<q-btn-group flat class="col full-width">
<q-btn
Expand Down Expand Up @@ -349,6 +355,11 @@ export default defineComponent({
}

.character-menu {
.item-container {
display: flex;
flex-direction: column;
}

.q-item {
color: colors.$display;
}
Expand All @@ -363,6 +374,10 @@ export default defineComponent({
}
}

.selected-row {
order: -1;
}

.selected-character-item,
.opened-character-item {
background-color: rgba(colors.$primary-rgb, 0.2);
tunamaguro marked this conversation as resolved.
Show resolved Hide resolved
Expand Down