Skip to content

Commit 6a83735

Browse files
authored
Merge pull request #4499 from traPtitech/fix/detail-button
fix:detailボタンの背景色をカラーテーマから持ってくるように
2 parents 834d99d + c51aea1 commit 6a83735

File tree

2 files changed

+5
-39
lines changed

2 files changed

+5
-39
lines changed

src/components/Main/MainView/QallView/DetailButton.vue

+4-35
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,22 @@
11
<script setup lang="ts">
2-
import { defineProps, useCssModule, computed } from 'vue'
2+
import { defineProps } from 'vue'
33
import AIcon from '/@/components/UI/AIcon.vue'
44
55
const props = defineProps({
66
onClick: {
77
type: Function,
88
required: true
9-
},
10-
inverted: {
11-
type: Boolean,
12-
default: false
139
}
1410
})
1511
16-
const style = useCssModule()
17-
1812
function handleClick() {
1913
props.onClick?.()
2014
}
21-
22-
const iconClass = computed(() => ({
23-
[style.inverted]: props.inverted
24-
}))
25-
26-
const buttonClass = computed(() => ({
27-
[style.detailButton]: true,
28-
[style.invertedBackground]: props.inverted,
29-
[style.normalBackground]: !props.inverted
30-
}))
3115
</script>
3216

3317
<template>
34-
<button :class="buttonClass" @click="handleClick">
35-
<AIcon name="plus-circle" mdi :class="iconClass" :size="24" />
18+
<button :class="$style.detailButton" @click="handleClick">
19+
<AIcon name="plus-circle" mdi :size="24" />
3620
</button>
3721
</template>
3822

@@ -45,22 +29,7 @@ const buttonClass = computed(() => ({
4529
align-items: center;
4630
justify-content: center;
4731
border-radius: 50%;
48-
width: 32px;
49-
height: 32px;
50-
}
51-
52-
.inverted {
53-
filter: invert(1);
54-
}
55-
56-
.invertedBackground {
57-
background-color: white;
58-
width: 24px;
59-
height: 24px;
60-
}
61-
62-
.normalBackground {
63-
background-color: black;
32+
background-color: $theme-background-primary-default;
6433
width: 24px;
6534
height: 24px;
6635
}

src/components/Main/MainView/QallView/QallView.vue

+1-4
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,7 @@ const toggleDanmaku = () => {
239239
:on-click="toggleVideo"
240240
:inverted="isCameraOn"
241241
/>
242-
<DetailButton
243-
:inverted="isCameraOn"
244-
@click="showCameraDetailSetting = true"
245-
/>
242+
<DetailButton @click="showCameraDetailSetting = true" />
246243
<CameraDetailSetting
247244
:open="showCameraDetailSetting"
248245
:video-inputs="videoInputs"

0 commit comments

Comments
 (0)