Skip to content

Commit c84cac1

Browse files
committed
Prototype of replacing jBox tooltips with native HTML/CSS
1 parent 3052b32 commit c84cac1

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed

locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,7 @@
36453645
"message": "Select or detect your board to see available online firmware releases - Select the correct firmware appropriate for your board."
36463646
},
36473647
"firmwareFlasherOnlineSelectBoardHint": {
3648-
"message": "Betaflight configurator supports flashing of Unified Targets with the respective board specific configurations in one step.<br><br>The concept of Unified Targets means that the same firmware .hex file can be used for all boards using the same MCU.<br><br>Betaflight 4.4 introduces <strong>Cloud Build</strong><br><br>With <strong>Cloud Build</strong> we need to define hardware options present on your build.<br><br>To make the different boards work with the same firmware, a specific configuration file is deployed alongside the firmware when a Unified Target is flashed.<br><br>With Local build you can load a unified target configuration file or chose a board before loading a firmware .hex file.<br><br>If you encounter problems using the firmware, please consider joining Discord or open an <a href=\"https://github.com/betaflight/betaflight/issues\" target=\"_blank\" rel=\"noopener noreferrer\">issue</a>."
3648+
"message": "Betaflight configurator supports flashing of Unified Targets with the respective board specific configurations in one step.\n\nThe concept of Unified Targets means that the same firmware .hex file can be used for all boards using the same MCU.\n\nBetaflight 4.4 introduces Cloud Build\n\nWith Cloud Build we need to define hardware options present on your build.\n\nTo make the different boards work with the same firmware, a specific configuration file is deployed alongside the firmware when a Unified Target is flashed.\n\nWith Local build you can load a unified target configuration file or chose a board before loading a firmware .hex file.\n\nIf you encounter problems using the firmware, please consider joining Discord or open an issue: https://github.com/betaflight/betaflight/issues."
36493649
},
36503650
"firmwareFlasherOnlineSelectFirmwareVersionDescription": {
36513651
"message": "Select firmware version for your board."

src/css/main.less

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ dialog {
11721172
gap: 0.5rem;
11731173
white-space: nowrap;
11741174
align-items: center;
1175-
overflow-x: hidden;
1175+
//overflow-x: hidden;
11761176
border-radius: 999px;
11771177
.switchery {
11781178
margin-top: -3px;
@@ -1624,6 +1624,61 @@ button.active {
16241624
border: 1px solid var(--primary-600);
16251625
color: #000;
16261626
}
1627+
//*
1628+
.cf_tip,
1629+
.cf_tip_wide {
1630+
position: relative;
1631+
}
1632+
.cf_tip:hover,
1633+
.cf_tip_wide:hover {
1634+
opacity: 1 !important;
1635+
z-index: 10000 !important;
1636+
}
1637+
.cf_tip:hover:before,
1638+
.cf_tip:hover:after,
1639+
.cf_tip_wide:hover:before,
1640+
.cf_tip_wide:hover:after {
1641+
display: block;
1642+
}
1643+
.cf_tip:before,
1644+
.cf_tip_wide:before {
1645+
content: "";
1646+
1647+
display: none;
1648+
left: 100%;
1649+
//right: 100%;
1650+
position: absolute;
1651+
top: 50%;
1652+
transform: translateY(-50%);
1653+
1654+
border: 6px solid;
1655+
border-color: transparent var(--primary-500) transparent transparent;
1656+
}
1657+
.cf_tip:after,
1658+
.cf_tip_wide:after {
1659+
content: attr(title);
1660+
font-size: 12px;
1661+
font-weight: normal;
1662+
text-wrap: wrap;
1663+
white-space: pre-wrap;
1664+
1665+
display: none;
1666+
left: 100%;
1667+
margin-left: 12px;
1668+
//right: 100%;
1669+
//margin-right: 12px;
1670+
position: absolute;
1671+
width: 250px;
1672+
top: 50%;
1673+
transform: translateY(-50%);
1674+
1675+
background: var(--surface-300);
1676+
border: 2px solid var(--primary-500);
1677+
border-radius: 0.5rem;
1678+
color: var(--text);
1679+
padding: 8px;
1680+
}
1681+
//*/
16271682
.jBox-Tooltip {
16281683
max-width: 180px;
16291684
}

src/css/tabs/pid_tuning.less

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
height: 10px;
9191
font-weight: normal;
9292
text-overflow: ellipsis;
93-
overflow: hidden;
93+
//overflow: hidden;
9494
color: var(--text);
9595
}
9696
tr {
@@ -1095,7 +1095,7 @@
10951095
div {
10961096
.xs {
10971097
text-overflow: ellipsis;
1098-
overflow: hidden;
1098+
//overflow: hidden;
10991099
white-space: nowrap;
11001100
}
11011101
}

src/js/gui.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ class GuiControl {
292292

293293
// loading tooltip
294294
$(function () {
295+
/*
295296
new jBox("Tooltip", {
296297
attach: ".cf_tip",
297298
trigger: "mouseenter",
@@ -320,6 +321,7 @@ class GuiControl {
320321
},
321322
outside: "x",
322323
});
324+
*/
323325
});
324326

325327
if (callback) {

0 commit comments

Comments
 (0)