mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-23 00:33:50 +02:00
Only apply font change when running under wine
This commit is contained in:
@@ -128,6 +128,7 @@ speechSynthesis.getVoices();
|
||||
isGameNoVR: true,
|
||||
isSteamVRRunning: false,
|
||||
isHmdAfk: false,
|
||||
isRunningUnderWine: false,
|
||||
appVersion: '',
|
||||
latestAppVersion: '',
|
||||
shiftHeld: false
|
||||
@@ -141,6 +142,7 @@ speechSynthesis.getVoices();
|
||||
el: '#x-app',
|
||||
async mounted() {
|
||||
await this.initLanguage();
|
||||
this.isRunningUnderWine = await AppApi.IsRunningUnderWine();
|
||||
await this.changeThemeMode();
|
||||
await AppApi.SetUserAgent();
|
||||
this.appVersion = await AppApi.GetVersion();
|
||||
@@ -8166,6 +8168,20 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
this.updateVRConfigVars();
|
||||
await this.updatetrustColor();
|
||||
await this.applyWineEmojis();
|
||||
};
|
||||
|
||||
$app.methods.applyWineEmojis = async function () {
|
||||
if (document.contains(document.getElementById('app-emoji-font'))) {
|
||||
document.getElementById('app-emoji-font').remove();
|
||||
}
|
||||
if (this.isRunningUnderWine) {
|
||||
var $appEmojiFont = document.createElement('link');
|
||||
$appEmojiFont.setAttribute('id', 'app-emoji-font');
|
||||
$appEmojiFont.rel = 'stylesheet';
|
||||
$appEmojiFont.href = 'emoji.font.css';
|
||||
document.head.appendChild($appEmojiFont);
|
||||
}
|
||||
};
|
||||
|
||||
$app.data.isStartAtWindowsStartup = await configRepository.getBool(
|
||||
|
||||
@@ -131,7 +131,7 @@ input,
|
||||
textarea,
|
||||
select,
|
||||
button {
|
||||
font-family: 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
font-family: 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC',
|
||||
'Meiryo UI', 'Malgun Gothic', 'Segoe UI', sans-serif;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class extends baseClass {
|
||||
nextClearVRCXCacheCheck: 0,
|
||||
nextDiscordUpdate: 0,
|
||||
nextAutoStateChange: 0,
|
||||
nextGameRunningCheck: 0,
|
||||
nextGameRunningCheck: 0
|
||||
};
|
||||
|
||||
_methods = {
|
||||
@@ -76,7 +76,10 @@ export default class extends baseClass {
|
||||
this.nextAutoStateChange = 3;
|
||||
this.updateAutoStateChange();
|
||||
}
|
||||
if (--this.nextGameRunningCheck <= 0) {
|
||||
if (
|
||||
this.isRunningUnderWine &&
|
||||
--this.nextGameRunningCheck <= 0
|
||||
) {
|
||||
this.nextGameRunningCheck = 3;
|
||||
AppApi.CheckGameRunning();
|
||||
}
|
||||
|
||||
40
html/src/emoji.font.scss
Normal file
40
html/src/emoji.font.scss
Normal file
@@ -0,0 +1,40 @@
|
||||
body,
|
||||
input,
|
||||
textarea,
|
||||
select,
|
||||
button {
|
||||
font-family: 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC',
|
||||
'Noto Color Emoji', 'Meiryo UI', 'Malgun Gothic', 'Segoe UI', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
--md-sys-typescale-headline-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-headline-small-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-title-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-label-large-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-label-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-large-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-small-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
'Roboto', sans-serif;
|
||||
}
|
||||
|
||||
:root {
|
||||
--font: 'Poppins', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC',
|
||||
'Noto Sans SC', 'Noto Color Emoji', sans-serif;
|
||||
}
|
||||
@@ -55,49 +55,49 @@ body {
|
||||
),
|
||||
rgb(var(--md-sys-color-surface));
|
||||
--md-sys-typescale-headline-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-headline-medium-line-height: 36px;
|
||||
--md-sys-typescale-headline-medium-size: 28px;
|
||||
--md-sys-typescale-headline-medium-weight: 500;
|
||||
--md-sys-typescale-headline-medium-tracking: 0;
|
||||
--md-sys-typescale-headline-small-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-headline-small-line-height: 32px;
|
||||
--md-sys-typescale-headline-small-size: 24px;
|
||||
--md-sys-typescale-headline-small-weight: 500;
|
||||
--md-sys-typescale-headline-small-tracking: 0;
|
||||
--md-sys-typescale-title-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-title-medium-line-height: 24px;
|
||||
--md-sys-typescale-title-medium-size: 16px;
|
||||
--md-sys-typescale-title-medium-weight: 600;
|
||||
--md-sys-typescale-title-medium-tracking: 0.15px;
|
||||
--md-sys-typescale-label-large-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-label-large-line-height: 20px;
|
||||
--md-sys-typescale-label-large-size: 14px;
|
||||
--md-sys-typescale-label-large-weight: 600;
|
||||
--md-sys-typescale-label-large-tracking: 0.1px;
|
||||
--md-sys-typescale-label-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-label-medium-line-height: 16px;
|
||||
--md-sys-typescale-label-medium-size: 12px;
|
||||
--md-sys-typescale-label-medium-weight: 600;
|
||||
--md-sys-typescale-label-medium-tracking: 0.5px;
|
||||
--md-sys-typescale-body-large-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-large-line-height: 24px;
|
||||
--md-sys-typescale-body-large-size: 16px;
|
||||
--md-sys-typescale-body-large-weight: 400;
|
||||
--md-sys-typescale-body-large-tracking: 0.5px;
|
||||
--md-sys-typescale-body-medium-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-medium-line-height: 20px;
|
||||
--md-sys-typescale-body-medium-size: 14px;
|
||||
--md-sys-typescale-body-medium-weight: 400;
|
||||
--md-sys-typescale-body-medium-tracking: 0.25px;
|
||||
--md-sys-typescale-body-small-font: 'Google Sans', 'Noto Sans',
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Noto Color Emoji', 'Roboto', sans-serif;
|
||||
'Noto Sans TC', 'Noto Sans JP', 'Noto Sans SC', 'Roboto', sans-serif;
|
||||
--md-sys-typescale-body-small-line-height: 16px;
|
||||
--md-sys-typescale-body-small-size: 12px;
|
||||
--md-sys-typescale-body-small-weight: 400;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
--lighter-lighter-lighter-lighter-bg: #857070;
|
||||
--lighter-border: #aa6065;
|
||||
--font: 'Poppins', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC',
|
||||
'Noto Sans SC', 'Noto Color Emoji', sans-serif;
|
||||
'Noto Sans SC', sans-serif;
|
||||
}
|
||||
body,
|
||||
button,
|
||||
|
||||
@@ -131,6 +131,7 @@ Vue.component('marquee-text', MarqueeText);
|
||||
appType: location.href.substr(-1),
|
||||
appLanguage: 'en',
|
||||
currentCulture: 'en-nz',
|
||||
isRunningUnderWine: false,
|
||||
currentTime: new Date().toJSON(),
|
||||
cpuUsageEnabled: false,
|
||||
cpuUsage: 0,
|
||||
@@ -169,7 +170,9 @@ Vue.component('marquee-text', MarqueeText);
|
||||
},
|
||||
watch: {},
|
||||
el: '#x-app',
|
||||
mounted() {
|
||||
async mounted() {
|
||||
this.isRunningUnderWine = await AppApiVr.IsRunningUnderWine();
|
||||
await this.applyWineEmojis();
|
||||
workerTimers.setTimeout(() => AppApiVr.VrInit(), 5000);
|
||||
if (this.appType === '1') {
|
||||
this.refreshCustomScript();
|
||||
@@ -658,6 +661,19 @@ Vue.component('marquee-text', MarqueeText);
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.applyWineEmojis = async function () {
|
||||
if (document.contains(document.getElementById('app-emoji-font'))) {
|
||||
document.getElementById('app-emoji-font').remove();
|
||||
}
|
||||
if (this.isRunningUnderWine) {
|
||||
var $appEmojiFont = document.createElement('link');
|
||||
$appEmojiFont.setAttribute('id', 'app-emoji-font');
|
||||
$appEmojiFont.rel = 'stylesheet';
|
||||
$appEmojiFont.href = 'emoji.font.css';
|
||||
document.head.appendChild($appEmojiFont);
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.trackingResultToClass = function (deviceStatus) {
|
||||
switch (deviceStatus) {
|
||||
case 'Uninitialized':
|
||||
|
||||
@@ -59,7 +59,7 @@ html
|
||||
span.extra
|
||||
span.time {{ feed.created_at | formatDate }}
|
||||
span.spin ▶️
|
||||
span.name(v-text="feed.displayName" style="margin-left:20px")
|
||||
span.name(v-text="feed.displayName" style="margin-left:30px")
|
||||
div(v-else-if="feed.type === 'Location'" class="x-friend-item" :class="{ friend: feed.isFriend, favorite: feed.isFavorite }")
|
||||
.detail
|
||||
span.extra
|
||||
|
||||
@@ -175,7 +175,7 @@ input,
|
||||
textarea,
|
||||
select,
|
||||
button {
|
||||
font-family: 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC', 'Noto Color Emoji',
|
||||
font-family: 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans TC', 'Noto Sans SC',
|
||||
'Meiryo UI', 'Malgun Gothic', 'Segoe UI', sans-serif;
|
||||
line-height: normal;
|
||||
text-shadow:
|
||||
@@ -350,8 +350,8 @@ i.x-user-status.busy {
|
||||
.spin {
|
||||
animation: rotation 2.5s infinite linear;
|
||||
position: absolute;
|
||||
width: 14px;
|
||||
height: 28px;
|
||||
width: 24px;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
@keyframes rotation {
|
||||
|
||||
Reference in New Issue
Block a user