Skip to content

Commit 2f61cfe

Browse files
committed
Prototype of replacing jBox tooltips with native HTML/CSS
1 parent 04ea058 commit 2f61cfe

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
@@ -3660,7 +3660,7 @@
36603660
"message": "Select or detect your board to see available online firmware releases - Select the correct firmware appropriate for your board."
36613661
},
36623662
"firmwareFlasherOnlineSelectBoardHint": {
3663-
"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>."
3663+
"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."
36643664
},
36653665
"firmwareFlasherOnlineSelectFirmwareVersionDescription": {
36663666
"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
@@ -1179,7 +1179,7 @@ dialog {
11791179
gap: 0.5rem;
11801180
white-space: nowrap;
11811181
align-items: center;
1182-
overflow-x: hidden;
1182+
//overflow-x: hidden;
11831183
border-radius: 999px;
11841184
.switchery {
11851185
margin-top: -3px;
@@ -1631,6 +1631,61 @@ button.active {
16311631
border: 1px solid var(--primary-600);
16321632
color: #000;
16331633
}
1634+
//*
1635+
.cf_tip,
1636+
.cf_tip_wide {
1637+
position: relative;
1638+
}
1639+
.cf_tip:hover,
1640+
.cf_tip_wide:hover {
1641+
opacity: 1 !important;
1642+
z-index: 10000 !important;
1643+
}
1644+
.cf_tip:hover:before,
1645+
.cf_tip:hover:after,
1646+
.cf_tip_wide:hover:before,
1647+
.cf_tip_wide:hover:after {
1648+
display: block;
1649+
}
1650+
.cf_tip:before,
1651+
.cf_tip_wide:before {
1652+
content: "";
1653+
1654+
display: none;
1655+
left: 100%;
1656+
//right: 100%;
1657+
position: absolute;
1658+
top: 50%;
1659+
transform: translateY(-50%);
1660+
1661+
border: 6px solid;
1662+
border-color: transparent var(--primary-500) transparent transparent;
1663+
}
1664+
.cf_tip:after,
1665+
.cf_tip_wide:after {
1666+
content: attr(title);
1667+
font-size: 12px;
1668+
font-weight: normal;
1669+
text-wrap: wrap;
1670+
white-space: pre-wrap;
1671+
1672+
display: none;
1673+
left: 100%;
1674+
margin-left: 12px;
1675+
//right: 100%;
1676+
//margin-right: 12px;
1677+
position: absolute;
1678+
width: 250px;
1679+
top: 50%;
1680+
transform: translateY(-50%);
1681+
1682+
background: var(--surface-300);
1683+
border: 2px solid var(--primary-500);
1684+
border-radius: 0.5rem;
1685+
color: var(--text);
1686+
padding: 8px;
1687+
}
1688+
//*/
16341689
.jBox-Tooltip {
16351690
max-width: 180px;
16361691
}

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)