Make opened tabs menu scrollable (#3833)

- If there are too many tabs opened to fit onto the screen,
the tabs menu can be scrolled
- When tabs menu is opened, scroll to the selected tab
- Use margins instead of padding to that the scrollbar does not
overlap with the cross button
- Make sure that if the tabs menu is long, there will
be a gap between it's top/bottom and the edge of the
screen
- On linux, screen.availTop and screen.availHeight are not always
correct and the menu can go outside of what is supposed to be
the available screen area. Special treatment for those
edge cases
This commit is contained in:
abaevbog 2024-05-01 02:00:15 -04:00 committed by GitHub
parent 9f453b55ad
commit adaa61f2cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 61 additions and 4 deletions

View file

@ -6,13 +6,16 @@
#zotero-tabs-menu-wrapper {
width: 350px;
background: var(--material-sidepane);
padding: 7px;
padding: 0;
border-radius: 5px;
--width-focus-border: 2px;
display: flex;
flex-direction: column;
min-height: 0;
}
#zotero-tabs-menu-filter {
margin: 0 0 7px 0;
margin: 7px 7px 2px 7px;
border-radius: 5px;
border: 1px solid transparent;
padding-inline-start: 5px !important;
@ -26,10 +29,14 @@
#zotero-tabs-menu-list {
appearance: none;
margin: 0;
overflow-x: hidden;
overflow-y: scroll;
scrollbar-width: thin;
padding: 5px 0;
.row {
display: flex;
padding-inline-start: 4px;
padding-inline: 4px;
}
.zotero-tabs-menu-entry {