mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-04 22:57:19 +02:00
Fix problem with Smart TV profile and Guide menu (#594)
This commit is contained in:
parent
4e736175b4
commit
a3c948b070
@ -7,11 +7,11 @@
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
body[data-media-type=tv] & {
|
||||
body[data-bx-media-type=tv] & {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
body:not([data-media-type=tv]) & {
|
||||
body:not([data-bx-media-type=tv]) & {
|
||||
flex-direction: row;
|
||||
|
||||
> button:first-of-type {
|
||||
@ -34,7 +34,7 @@
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
|
||||
body[data-media-type=tv] & {
|
||||
body[data-bx-media-type=tv] & {
|
||||
flex-direction: column;
|
||||
|
||||
button {
|
||||
@ -42,7 +42,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
body:not([data-media-type=tv]) & {
|
||||
body:not([data-bx-media-type=tv]) & {
|
||||
button {
|
||||
span {
|
||||
display: none;
|
||||
|
@ -8,6 +8,9 @@ import { SettingsDialog } from "./dialog/settings-dialog";
|
||||
import { TrueAchievements } from "@/utils/true-achievements";
|
||||
import { BxIcon } from "@/utils/bx-icon";
|
||||
import { BxEventBus } from "@/utils/bx-event-bus";
|
||||
import { getPref } from "@/utils/settings-storages/global-settings-storage";
|
||||
import { UiLayout } from "@/enums/pref-values";
|
||||
import { PrefKey } from "@/enums/pref-keys";
|
||||
|
||||
export enum GuideMenuTab {
|
||||
HOME = 'home',
|
||||
@ -111,6 +114,11 @@ export class GuideMenu {
|
||||
class: 'bx-guide-home-buttons',
|
||||
});
|
||||
|
||||
// Set TV tag
|
||||
if (STATES.userAgent.isTv || getPref<UiLayout>(PrefKey.UI_LAYOUT) === UiLayout.TV) {
|
||||
document.body.dataset.bxMediaType = 'tv';
|
||||
}
|
||||
|
||||
for (const $button of buttonsLayout) {
|
||||
if (!$button) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user