mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-26 17:55:21 +03:00
Fix preview size
Still plan on adding guides for native elements
This commit is contained in:
parent
6258ba8822
commit
33ac945f10
3 changed files with 59 additions and 13 deletions
|
@ -430,6 +430,31 @@ button {
|
|||
left: calc(50% - 197px);
|
||||
}
|
||||
|
||||
.tab-osd .preview_bfhdcompat {
|
||||
width: 636px !important; /* 12 X char width */
|
||||
left: calc(50% - 335px) !important; /* width / 2 + 17 */
|
||||
}
|
||||
|
||||
.tab-osd .hd_bfhdcompat_43_left {
|
||||
border-left: 2px solid red;
|
||||
position: absolute;
|
||||
/*left: 77.5px; // Calculated correct position */
|
||||
left: 30px;
|
||||
height: calc(100% - 27px);
|
||||
}
|
||||
|
||||
.tab-osd .hd_bfhdcompat_43_right {
|
||||
border-right: 2px solid red;
|
||||
position: absolute;
|
||||
/* right: 77.5px; // Calculated correct position */
|
||||
right: 36px;
|
||||
height: calc(100% - 27px);
|
||||
}
|
||||
|
||||
.tab-osd .preview_bfhdcompat_side {
|
||||
width: calc(50% - 335px) !important;
|
||||
}
|
||||
|
||||
.tab-osd .preview_avatar {
|
||||
width: 636px !important; /* 12 X char width */
|
||||
left: calc(50% - 335px) !important; /* width / 2 + 17 */
|
||||
|
|
|
@ -43,6 +43,11 @@
|
|||
<div class="hd_avatar_storage_box_left"></div>
|
||||
<div class="hd_avatar_storage_box_right"></div>
|
||||
<div class="hd_avatar_bottom_bar"></div>
|
||||
<div class="hd_bfhdcompat_storage_box_top"></div>
|
||||
<div class="hd_bfhdcompat_storage_box_bottom"></div>
|
||||
<div class="hd_bfhdcompat_storage_box_left"></div>
|
||||
<div class="hd_bfhdcompat_storage_box_right"></div>
|
||||
<div class="hd_bfhdcompat_bottom_bar"></div>
|
||||
<div class="preview"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
36
tabs/osd.js
36
tabs/osd.js
|
@ -182,7 +182,7 @@ FONT.parseMCMFontFile = function (data) {
|
|||
|
||||
// make sure the font file is valid
|
||||
if (data.shift().trim() != 'MAX7456') {
|
||||
var msg = 'that font file doesnt have the MAX7456 header, giving up';
|
||||
var msg = 'that font file doesn\'t have the MAX7456 header, giving up';
|
||||
console.debug(msg);
|
||||
Promise.reject(msg);
|
||||
}
|
||||
|
@ -2140,17 +2140,21 @@ OSD.updateDisplaySize = function () {
|
|||
|
||||
// set the preview size based on the video type
|
||||
// -- AVATAR
|
||||
$('.third_left').toggleClass('preview_avatar_side', (video_type == 'AVATAR'))
|
||||
$('.preview').toggleClass('preview_avatar cut43_left', (video_type == 'AVATAR'))
|
||||
$('.third_right').toggleClass('preview_avatar_side', (video_type == 'AVATAR'))
|
||||
$('.third_left').toggleClass('preview_avatar_side', (video_type == 'AVATAR'));
|
||||
$('.preview').toggleClass('preview_avatar cut43_left', (video_type == 'AVATAR'));
|
||||
$('.third_right').toggleClass('preview_avatar_side', (video_type == 'AVATAR'));
|
||||
// -- DJI WTF
|
||||
$('.third_left').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF')
|
||||
$('.preview').toggleClass('preview_dji_hd cut43_left', video_type == 'DJIWTF')
|
||||
$('.third_right').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF')
|
||||
$('.third_left').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF');
|
||||
$('.preview').toggleClass('preview_dji_hd cut43_left', video_type == 'DJIWTF');
|
||||
$('.third_right').toggleClass('preview_dji_hd_side', video_type == 'DJIWTF');
|
||||
// -- HD ZERO
|
||||
$('.third_left').toggleClass('preview_hdzero_side', (video_type == 'HDZERO'))
|
||||
$('.preview').toggleClass('preview_hdzero cut43_left', (video_type == 'HDZERO'))
|
||||
$('.third_right').toggleClass('preview_hdzero_side', (video_type == 'HDZERO'))
|
||||
$('.third_left').toggleClass('preview_hdzero_side', (video_type == 'HDZERO'));
|
||||
$('.preview').toggleClass('preview_hdzero cut43_left', (video_type == 'HDZERO'));
|
||||
$('.third_right').toggleClass('preview_hdzero_side', (video_type == 'HDZERO'));
|
||||
// -- BFHDCOMPAT
|
||||
$('.third_left').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT'))
|
||||
$('.preview').toggleClass('preview_bfhdcompat cut43_left', (video_type == 'BFHDCOMPAT'))
|
||||
$('.third_right').toggleClass('preview_bfhdcompat_side', (video_type == 'BFHDCOMPAT'))
|
||||
|
||||
OSD.GUI.updateGuidesView($('#videoGuides').find('input').is(':checked'));
|
||||
};
|
||||
|
@ -2748,6 +2752,18 @@ OSD.GUI.updateGuidesView = function(on) {
|
|||
$('.hd_avatar_storage_box_left').toggleClass('hd_avatar_storagebox_l', (isAvatar && on))
|
||||
$('.hd_avatar_storage_box_right').toggleClass('hd_avatar_storagebox_r', (isAvatar && on))
|
||||
|
||||
ifBfHdCompat = OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'BFHDCOMPAT';
|
||||
/*
|
||||
$('.hd_43_margin_left').toggleClass('hd_bfhdcompat_43_left', (isBfHdCompat && on))
|
||||
$('.hd_43_margin_right').toggleClass('hd_bfhdcompat_43_right', (isBfHdCompat && on))
|
||||
$('.hd_bfhdcompat').toggleClass('hd_bfhdcompat_bottom', (isBfHdCompat && on))
|
||||
$('.hd_bfhdcompat_storage_box_top').toggleClass('hd_bfhdcompat_storagebox_t', (isBfHdCompat && on))
|
||||
$('.hd_bfhdcompat_storage_box_bottom').toggleClass('hd_bfhdcompat_storagebox_b', (isBfHdCompat && on))
|
||||
$('.hd_bfhdcompat_storage_box_left').toggleClass('hd_bfhdcompat_storagebox_l', (isBfHdCompat && on))
|
||||
$('.hd_bfhdcompat_storage_box_right').toggleClass('hd_bfhdcompat_storagebox_r', (isBfHdCompat && on))
|
||||
*/
|
||||
|
||||
|
||||
isPAL = OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'PAL' || OSD.constants.VIDEO_TYPES[OSD.data.preferences.video_system] == 'AUTO';
|
||||
$('.pal_ntsc_box_bottom').toggleClass('ntsc_bottom', (isPAL && on))
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue