Merge pull request #1728 from dpalou/MOBILE-2830

Mobile 2830
main
Juan Leyva 2019-01-15 15:35:21 +01:00 committed by GitHub
commit 2a9ddac126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

View File

@ -51,11 +51,17 @@ export class MoodleMobileApp implements OnInit {
keyboard.hideFormAccessoryBar(false); keyboard.hideFormAccessoryBar(false);
let desktopClass = this.appProvider.isDesktop() ? 'platform-desktop' : ''; if (this.appProvider.isDesktop()) {
desktopClass += this.appProvider.isMac() ? ' platform-mac' : ''; app.setElementClass('platform-desktop', true);
desktopClass += this.appProvider.isLinux() ? ' platform-linux' : '';
desktopClass += this.appProvider.isWindows() ? ' platform-windows' : ''; if (this.appProvider.isMac()) {
desktopClass != '' ? app.setElementClass(desktopClass, true) : false; app.setElementClass('platform-mac', true);
} else if (this.appProvider.isLinux()) {
app.setElementClass('platform-linux', true);
} else if (this.appProvider.isWindows()) {
app.setElementClass('platform-windows', true);
}
}
}); });
} }

View File

@ -968,3 +968,16 @@ ion-modal,
.split-pane { .split-pane {
contain: size layout style; contain: size layout style;
} }
// Styles for desktop apps only.
ion-app.platform-desktop {
video::-webkit-media-text-track-display {
white-space: normal !important;
}
&.platform-windows {
video::-webkit-media-text-track-display {
font-size: 0.6em;
}
}
}