Skip to content

Commit

Permalink
hdzero - codacy cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter committed May 16, 2022
1 parent 47f6fc7 commit 4de61e4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 29 deletions.
10 changes: 6 additions & 4 deletions src/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1208,11 +1208,13 @@ dialog {
float: left;
width: 33%;
}

.third_left_osd {
float: left;
width: calc(50% - 360px);
min-width: 23%;
width: calc(50% - 360px);
min-width: 23%;
}

.third_center {
display: inline-block;
width: 34%;
Expand All @@ -1224,7 +1226,7 @@ dialog {
}

.third_right_osd {
min-width: 68%;
min-width: 68%;
}
.fourth {
float: left;
Expand All @@ -1248,7 +1250,7 @@ dialog {

.twothird_osd {
float: left;
width: 60%;
width: 60%;
}

/* Columns END> */
Expand Down
45 changes: 22 additions & 23 deletions src/css/tabs/osd.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint
.tab-osd .info {
margin: 10px 0 0 0;
position: relative;
Expand Down Expand Up @@ -256,20 +259,20 @@
}

.tab-osd .preview .gui_box_titlebar label {
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
white-space: nowrap;
vertical-align: text-bottom;
max-width: 100px;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
white-space: nowrap;
vertical-align: text-bottom;
}

.tab-osd .preview .gui_box_titlebar select {
max-width: 100px;
border-radius: 2px;
font-size: 11px;
font-weight: normal;
font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif;
max-width: 100px;
border-radius: 2px;
font-size: 11px;
font-weight: normal;
font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif;
}

.tab-osd .preview .gui_box_bottombar {
Expand Down Expand Up @@ -446,12 +449,11 @@ button {
}

.tab-osd .third_left {
float: left;
/* width: calc(50% - 197px); */
float: left;
/* width: calc(50% - 197px); */
width: 32%;
max-width: 300px;
margin-right: 5px;

}

.tab-osd .third_center {
Expand All @@ -464,29 +466,26 @@ button {
}

.tab-osd .third_right {
float: left;
/* width: calc(50% - 197px); */
width: 32%;
max-width: 300px;
margin-left: 20px;
float: left;
/* width: calc(50% - 197px); */
width: 32%;
max-width: 300px;
margin-left: 20px;
}

.tab-osd .preview {
width: 360px;
float: left;
/* position: sticky; */
top: 0px;

/* please don't copy the generic background image from another project
* and replace the one that @nathantsoi took :)
*/
background: url(../../images/osd-bg-1.jpg);
background-size: cover;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;

/* left: calc(50% - 197px); */

}

.tab-osd .preview_hd {
Expand All @@ -495,7 +494,7 @@ button {
}

.tab-osd .preview_hd_side {
/* width: calc(50% - 317px) !important; */
/* width: calc(50% - 317px) !important; */
}

.tab-osd .alarms label {
Expand Down
4 changes: 2 additions & 2 deletions src/js/tabs/osd.js
Original file line number Diff line number Diff line change
Expand Up @@ -1816,9 +1816,9 @@ OSD.msp = {
display_item.isVisible = [];
for (let osd_profile = 0; osd_profile < OSD.getNumberOfProfiles(); osd_profile++) {
if (semver.gte(CONFIG.apiVersion, "1.52.0")) {
display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE << osd_profile)) != 0; //x2000 no matter SD/HD
display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE << osd_profile)) !== 0; //x2000 no matter SD/HD
} else {
display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE_SD << osd_profile)) != 0; //legacy 0x800
display_item.isVisible[osd_profile] = (bits & (OSD.constants.VISIBLE_SD << osd_profile)) !== 0; //legacy 0x800
}
}
} else {
Expand Down

0 comments on commit 4de61e4

Please sign in to comment.