Et2VfsPath: Make sure there's enough space for right scroll button

This commit is contained in:
nathan 2024-04-12 10:18:25 -06:00
parent 15eab33bfb
commit a3835de82f
3 changed files with 8 additions and 6 deletions

View File

@ -68,6 +68,11 @@ export default css`
min-width: 10em;
}
.vfs-path__overflow .vfs-path__scroll {
min-width: 8em;
margin-right: 2em;
}
.form-control-input sl-icon-button[name*="caret"] {
display: none;
position: absolute;

View File

@ -154,17 +154,14 @@ export class Et2VfsPath extends Et2InputWidget(LitElement)
{
return;
}
wrapper.parentElement.classList.remove("vfs-path__overflow");
path.updateComplete.then(() =>
{
if(wrapper.clientWidth < scroll.scrollWidth)
{
// Too small
wrapper.scrollLeft = scroll.scrollWidth - wrapper.clientWidth;
wrapper.parentElement.classList.add("vfs-path__overflow");
}
else
{
wrapper.parentElement.classList.remove("vfs-path__overflow");
wrapper.scrollLeft = scroll.scrollWidth - wrapper.clientWidth;
}
});
}

View File

@ -37,7 +37,7 @@ input#filemanager-index_path {
/* Let path have more space */
#filemanager-index_filemanager-index-header_row {
flex: 20 1 auto;
min-width: 20em;
min-width: 24em;
}
#filemanager-index_nm_path {