优化大屏下的UI展示
parent
081d6dc91e
commit
bcc79541c1
|
@ -29,11 +29,14 @@ const themes = {
|
||||||
|
|
||||||
const getBarWidth = canvasWidth => {
|
const getBarWidth = canvasWidth => {
|
||||||
let barWidth = (canvasWidth / 128) * 2.5
|
let barWidth = (canvasWidth / 128) * 2.5
|
||||||
const width = canvasWidth / 85
|
const width = canvasWidth / 86
|
||||||
|
const diffWidth = barWidth - width
|
||||||
// console.log(barWidth - width)
|
// console.log(barWidth - width)
|
||||||
// if (barWidth - width > 20) newBarWidth = 20
|
// if (barWidth - width > 20) newBarWidth = 20
|
||||||
// barWidth = newBarWidth
|
// barWidth = newBarWidth
|
||||||
return barWidth - width > 12 ? width : barWidth
|
return diffWidth > 32
|
||||||
|
? canvasWidth / 128 // 4k屏、超宽屏直接显示所有频谱条
|
||||||
|
: diffWidth > 12 ? width : barWidth
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
setup() {
|
setup() {
|
||||||
|
|
|
@ -92,11 +92,11 @@ export default {
|
||||||
...mapMutations('list', ['listAdd', 'listMove', 'createUserList']),
|
...mapMutations('list', ['listAdd', 'listMove', 'createUserList']),
|
||||||
handleResize() {
|
handleResize() {
|
||||||
const width = window.innerWidth
|
const width = window.innerWidth
|
||||||
this.rowNum = width <= 1440
|
this.rowNum = width < 1920
|
||||||
? 3
|
? 3
|
||||||
: width <= 1920
|
: width < 2560
|
||||||
? 4
|
? 4
|
||||||
: width <= 2560 ? 5 : 6
|
: width < 3840 ? 5 : 6
|
||||||
},
|
},
|
||||||
handleClick(index) {
|
handleClick(index) {
|
||||||
this.isMove
|
this.isMove
|
||||||
|
@ -212,19 +212,19 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@item-width2: (100% / 4);
|
@item-width2: (100% / 4);
|
||||||
@media screen and (min-width: 1920px){
|
@media (min-width: 1920px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width2 - 15px);
|
width: calc(@item-width2 - 15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@item-width3: (100% / 5);
|
@item-width3: (100% / 5);
|
||||||
@media screen and (min-width: 2048px){
|
@media (min-width: 2560px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width3 - 15px);
|
width: calc(@item-width3 - 15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@item-width4: (100% / 6);
|
@item-width4: (100% / 6);
|
||||||
@media screen and (min-width: 2560px){
|
@media (min-width: 3840px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width4 - 15px);
|
width: calc(@item-width4 - 15px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,11 +93,11 @@ export default {
|
||||||
...mapMutations('list', ['listAddMultiple', 'listMoveMultiple', 'createUserList']),
|
...mapMutations('list', ['listAddMultiple', 'listMoveMultiple', 'createUserList']),
|
||||||
handleResize() {
|
handleResize() {
|
||||||
const width = window.innerWidth
|
const width = window.innerWidth
|
||||||
this.rowNum = width <= 1440
|
this.rowNum = width < 1920
|
||||||
? 3
|
? 3
|
||||||
: width <= 1920
|
: width < 2560
|
||||||
? 4
|
? 4
|
||||||
: width <= 2560 ? 5 : 6
|
: width < 3840 ? 5 : 6
|
||||||
},
|
},
|
||||||
handleClick(index) {
|
handleClick(index) {
|
||||||
this.isMove
|
this.isMove
|
||||||
|
@ -210,19 +210,19 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
@item-width2: (100% / 4);
|
@item-width2: (100% / 4);
|
||||||
@media screen and (min-width: 1920px){
|
@media (min-width: 1920px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width2 - 15px);
|
width: calc(@item-width2 - 15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@item-width3: (100% / 5);
|
@item-width3: (100% / 5);
|
||||||
@media screen and (min-width: 2048px){
|
@media (min-width: 2560px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width3 - 15px);
|
width: calc(@item-width3 - 15px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@item-width4: (100% / 6);
|
@item-width4: (100% / 6);
|
||||||
@media screen and (min-width: 2560px){
|
@media (min-width: 3840px){
|
||||||
.btn {
|
.btn {
|
||||||
width: calc(@item-width4 - 15px);
|
width: calc(@item-width4 - 15px);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { clipboardWriteText } from '@renderer/utils'
|
import { clipboardWriteText } from '@renderer/utils'
|
||||||
import { lyric } from '@renderer/core/share/lyric'
|
import { lyric } from '@renderer/core/share/lyric'
|
||||||
|
import { isFullscreen } from '@renderer/core/share'
|
||||||
import { isPlay, isShowLrcSelectContent, isShowPlayComment } from '@renderer/core/share/player'
|
import { isPlay, isShowLrcSelectContent, isShowPlayComment } from '@renderer/core/share/player'
|
||||||
import { onMounted, onBeforeUnmount, useCommit, useRefGetter, computed } from '@renderer/utils/vueTools'
|
import { onMounted, onBeforeUnmount, useCommit, useRefGetter, computed } from '@renderer/utils/vueTools'
|
||||||
import useLyric from '@renderer/utils/compositions/useLyric'
|
import useLyric from '@renderer/utils/compositions/useLyric'
|
||||||
|
@ -68,7 +69,8 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const lrcFontSize = computed(() => {
|
const lrcFontSize = computed(() => {
|
||||||
const size = setting.value.playDetail.style.fontSize / 100
|
let size = setting.value.playDetail.style.fontSize / 100
|
||||||
|
if (isFullscreen.value) size = size *= 1.4
|
||||||
return {
|
return {
|
||||||
'--playDetail-lrc-font-size': (isShowPlayComment.value ? size * 0.82 : size) + 'rem',
|
'--playDetail-lrc-font-size': (isShowPlayComment.value ? size * 0.82 : size) + 'rem',
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue