Skip to content

Commit e4bb8d6

Browse files
committed
Better adjust status geometry
1 parent 819056c commit e4bb8d6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

scripts/JSRootPainter.jquery.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,8 @@
12451245
}
12461246
});
12471247

1248-
if (!height || (typeof height === 'string')) height = this.last_hsepar_height || 25;
1248+
if (!height || (typeof height === 'string')) height = this.last_hsepar_height || 20;
1249+
var skip_height_check = (mode==='toggle') && (height === this.last_hsepar_height);
12491250

12501251
this.AdjustSeparator(null, height, true);
12511252

@@ -1255,7 +1256,7 @@
12551256
}
12561257

12571258
this.status_layout = new JSROOT.GridDisplay(id, 'horiz4_1213');
1258-
if ((mode==='toggle') && (height === this.last_hsepar_height)) this.status_layout.first_check = true; // if restored size, do not adjust height once again
1259+
if (skip_height_check) this.status_layout.first_check = true; // if restored size, do not adjust height once again
12591260

12601261
var frame_titles = ['object name','object title','mouse coordiantes', 'object info'];
12611262
for (var k=0;k<4;++k)
@@ -1282,7 +1283,7 @@
12821283
var maxh = 0;
12831284
for (var n=0;n<4;++n)
12841285
maxh = Math.max(maxh, $(this.status_layout.GetFrame(n)).children('label').outerHeight());
1285-
if (maxh>5) this.AdjustSeparator(null, maxh, true);
1286+
if ((maxh>5) && ((maxh>this.last_hsepar_height) || (maxh<this.last_hsepar_height+5))) this.AdjustSeparator(null, maxh, true);
12861287
}
12871288
}
12881289

style/JSRootPainter.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,9 +725,9 @@
725725
}
726726

727727
.jsroot_status_label {
728-
margin: 2px;
728+
margin: 3px;
729729
margin-left: 5px;
730-
font-size: medium;
730+
font-size: 14px;
731731
vertical-align: middle;
732-
white-space: nowrap;
732+
white-space: nowrap;
733733
}

0 commit comments

Comments
 (0)