Fix OSD (HD) display overflow on Android (#3241)

* Fix OSD (HD) display overflow on Android
* Add button for OSD tab orientation (Android)
10.9-maintenance 10.9.0-RC5
haslinghuis 2023-01-16 00:14:08 +01:00 committed by GitHub
parent b4077405a0
commit 4b0d4467de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 1 deletions

View File

@ -4839,6 +4839,9 @@
"message": "Uploaded all {{length}} characters to the OSD"
},
"osdToggleOrientation": {
"message": "Orientation"
},
"osdSetupSave": {
"message": "Save"
},

View File

@ -541,7 +541,7 @@ button {
@media all and (max-width: 575px) {
.tab-osd {
.osd-preview {
min-width: 100%;
width: fit-content;
order: 1;
}
.osd-feature {

View File

@ -2609,6 +2609,8 @@ osd.initialize = function(callback) {
// must invoke before i18n.localizePage() since it adds translation keys for expected logo size
LogoManager.init(FONT, SYM.LOGO);
$('div.btn.orientation').toggle(GUI.isCordova());
// translate to user-selected language
i18n.localizePage();
@ -3281,6 +3283,8 @@ osd.initialize = function(callback) {
self.analyticsChanges = {};
});
$('a.orientation').on('click', () => screen.orientation.lock(screen.orientation.type.startsWith("portrait") ? "landscape" : "portrait"));
// font preview window
const fontPreviewElement = $('.font-preview');
@ -3411,6 +3415,10 @@ osd.cleanup = function(callback) {
OSD.GUI.fontManager.destroy();
}
if (GUI.isCordova()) {
window.screen.orientation.lock("portrait");
}
// unbind "global" events
$(document).unbind('keypress');
$(document).off('click', 'span.progressLabel a');

View File

@ -197,6 +197,9 @@
<div class="supported hide">
<div class="content_toolbar" style="left:0;">
<div class="btn orientation">
<a class="orientation" href="#" i18n="osdToggleOrientation"></a>
</div>
<div class="btn">
<a class="requires-max7456-font-device-detected fonts" id="fontmanager" href="#" i18n="osdSetupFontManager"></a>
</div>