Merge pull request #12250 from Snuffleupagus/dropdownToolbarButton-adjustWidth
Update the zoom dropdown width calculation to work better in locales with long zoom-strings (PR 11077 follow-up)
This commit is contained in:
commit
164be97dfc
@ -271,7 +271,7 @@ class Toolbar {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH;
|
const overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH;
|
||||||
maxWidth += 1.5 * overflow;
|
maxWidth += 2 * overflow;
|
||||||
|
|
||||||
if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) {
|
if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) {
|
||||||
items.scaleSelect.style.width = `${maxWidth + overflow}px`;
|
items.scaleSelect.style.width = `${maxWidth + overflow}px`;
|
||||||
|
@ -352,7 +352,7 @@ html[dir='rtl'] #outerContainer.sidebarOpen #viewerContainer:not(.pdfPresentatio
|
|||||||
background-color: var(--sidebar-bg-color);
|
background-color: var(--sidebar-bg-color);
|
||||||
}
|
}
|
||||||
html[dir='ltr'] #toolbarSidebar {
|
html[dir='ltr'] #toolbarSidebar {
|
||||||
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25),
|
box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.25),
|
||||||
0 1px 0 rgba(0, 0, 0, 0.15),
|
0 1px 0 rgba(0, 0, 0, 0.15),
|
||||||
0 0 1px rgba(0, 0, 0, 0.1);
|
0 0 1px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
@ -869,10 +869,10 @@ html[dir='rtl'] #toolbarViewerLeft > .toolbarButton:first-child {
|
|||||||
max-width: 16px;
|
max-width: 16px;
|
||||||
}
|
}
|
||||||
html[dir='ltr'] .dropdownToolbarButton::after {
|
html[dir='ltr'] .dropdownToolbarButton::after {
|
||||||
right: 8px;
|
right: 7px;
|
||||||
}
|
}
|
||||||
html[dir='rtl'] .dropdownToolbarButton::after {
|
html[dir='rtl'] .dropdownToolbarButton::after {
|
||||||
left: 8px;
|
left: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdownToolbarButton > select {
|
.dropdownToolbarButton > select {
|
||||||
@ -881,11 +881,16 @@ html[dir='rtl'] .dropdownToolbarButton::after {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: var(--main-color);
|
color: var(--main-color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1px 5px 2px;
|
padding: 1px 0 2px;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: var(--dropdown-btn-bg-color);
|
background-color: var(--dropdown-btn-bg-color);
|
||||||
}
|
}
|
||||||
|
html[dir='ltr'] .dropdownToolbarButton > select {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
html[dir='rtl'] .dropdownToolbarButton > select {
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
.dropdownToolbarButton > select:hover {
|
.dropdownToolbarButton > select:hover {
|
||||||
background-color: var(--button-hover-color);
|
background-color: var(--button-hover-color);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user