Skip to content

Commit adc3978

Browse files
committed
expand items when selected and fix highlighting of selected tree items
1 parent 539a006 commit adc3978

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed

api-docs/cppdocs/binaryninja-docs.css

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ tr#projectrow {
601601
background-color: var(--bn-red);
602602
color: #ffffff;
603603
display: inline-block;
604-
line-height: var(--tree-item-height);
604+
line-height: 1.4;
605605
padding: 0 4px;
606606
margin: 0 -4px;
607607
}
@@ -620,8 +620,13 @@ html.dark-mode #nav-tree .selected a {
620620
}
621621

622622
#nav-tree .item {
623-
height: var(--tree-item-height);
624-
line-height: var(--tree-item-height);
623+
min-height: var(--tree-item-height);
624+
line-height: 1.4;
625+
padding-top: 6px;
626+
padding-bottom: 6px;
627+
box-sizing: border-box;
628+
display: flex;
629+
align-items: center;
625630
}
626631

627632
/* Undecorated root node */
@@ -658,10 +663,6 @@ a.index\.html {
658663
margin-top: 0;
659664
}
660665

661-
#nav-tree-contents > ul > li:first-child > ul > li > .item {
662-
padding-top: 4px;
663-
}
664-
665666
/* ============================================================================
666667
* COLLAPSIBLE SECTIONS (dynsections.js)
667668
* ============================================================================ */
@@ -676,7 +677,8 @@ a.index\.html {
676677
}
677678

678679
.arrow:hover .arrowhead,
679-
tr:hover .arrowhead {
680+
tr:hover .arrowhead,
681+
.arrowhead.opened {
680682
opacity: 1;
681683
}
682684

api-docs/cppdocs/header.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,28 @@
2626
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
2727
$extrastylesheet
2828
<script type="text/javascript" src="$relpath^binaryninja-darkmode.js"></script>
29+
<script type="text/javascript">
30+
$(document).ready(function() {
31+
setTimeout(function() {
32+
var selected = document.querySelector('#nav-tree .selected');
33+
if (selected) {
34+
var parentLi = selected.closest('li');
35+
if (parentLi) {
36+
var arrow = parentLi.querySelector('.arrow');
37+
var arrowhead = arrow ? arrow.querySelector('.arrowhead.closed') : null;
38+
if (arrowhead) {
39+
arrow.click();
40+
setTimeout(function() {
41+
if (document.activeElement) {
42+
document.activeElement.blur();
43+
}
44+
}, 0);
45+
}
46+
}
47+
}
48+
}, 150);
49+
});
50+
</script>
2951
</head>
3052
<body>
3153
<!--BEGIN FULL_SIDEBAR-->

0 commit comments

Comments
 (0)