Skip to content

Commit

Permalink
EPUB: Disable spread mode control when in scrolled mode
Browse files Browse the repository at this point in the history
And don't show :active styles when split button is disabled.
  • Loading branch information
AbeJellinek committed Feb 19, 2025
1 parent 810b782 commit 782b9d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/common/components/modal-popup/appearance-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ function AppearancePopup(props) {
className={cx({ active: props.viewStats.spreadMode === 0 })}
title={intl.formatMessage({ id: 'pdfReader.single' })}
onClick={() => props.onChangeSpreadMode(0)}
disabled={props.viewStats.flowMode === 'scrolled'}
><IconColumnSingle/></button>
<button
tabIndex={-1}
className={cx({ active: props.viewStats.spreadMode === 1 })}
title={intl.formatMessage({ id: 'pdfReader.double' })}
onClick={() => props.onChangeSpreadMode(1)}
disabled={props.viewStats.flowMode === 'scrolled'}
><IconColumnDouble/></button>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/common/stylesheets/components/_modal-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
box-shadow: none;
position: relative;

&.active, &:active, &.active-pseudo-class-fix {
&.active, &:active:not(:disabled), &.active-pseudo-class-fix:not(:disabled) {
background: var(--material-button, #FFFFFF);
border: 0.5px solid var(--fill-senary, #00000005);
box-shadow: 0px 0px 0px 0.5px rgba(0, 0, 0, 0.05), 0px 0.5px 2.5px 0px rgba(0, 0, 0, 0.30);
Expand All @@ -266,7 +266,7 @@
}
}

&:active:not(.active), &.active-pseudo-class-fix:not(.active) {
&:active:not(.active):not(:disabled), &.active-pseudo-class-fix:not(.active):not(:disabled) {
background-color: var(--color-button50);
z-index: 1;
}
Expand Down

0 comments on commit 782b9d1

Please sign in to comment.