We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80315e8 commit 2a8dc6dCopy full SHA for 2a8dc6d
src/Themes/Default/Concerns/DrawsTabs.php
@@ -39,11 +39,11 @@ protected function tabs(
39
40
// automatic horizontal tab scrolling
41
if ($strippedWidth($top_row) > $width) {
42
+ $scroll = $selected / ($tabs->count() - 1);
43
$chars_to_kill = $strippedWidth($top_row) - $width;
- $percent = $selected / ($tabs->count() - 1);
44
- $left = (int) round($percent * $chars_to_kill);
+ $offset = (int) round($scroll * $chars_to_kill);
45
foreach ([&$top_row, &$middle_row, &$bottom_row] as &$row) {
46
- $row = mb_substr($row, $left, mb_strwidth($row) - $chars_to_kill);
+ $row = mb_substr($row, $offset, mb_strwidth($row) - $chars_to_kill);
47
}
48
49
0 commit comments