Add an option to disable alternating row colors. Resolves #4628.

This commit is contained in:
Tom Najdek 2024-08-27 12:36:20 +02:00
parent 671577e35e
commit 334a55b2aa
No known key found for this signature in database
GPG key ID: EEC61A7B4C667D77
5 changed files with 20 additions and 5 deletions

View file

@ -1258,7 +1258,8 @@ class VirtualizedTable extends React.Component {
onMouseLeave: e => this._handleMouseLeave(e),
className: cx(["virtualized-table", {
resizing: this.state.resizing,
'multi-select': this.props.multiSelect
'multi-select': this.props.multiSelect,
'no-alternating-rows': Zotero.Prefs.get('ui.noAlternatingRows'),
}]),
id: this.props.id,
ref: ref => this._topDiv = ref,

View file

@ -58,6 +58,13 @@
</menulist>
</hbox>
<hbox align="center">
<checkbox data-l10n-id="preferences-item-pane-disable-alternating-rows"
preference="extensions.zotero.ui.noAlternatingRows"
native="true"
/>
</hbox>
<vbox id="item-pane-header-bib-entry-options" class="indented-pref">
<hbox align="center">
<label data-l10n-id="preferences-item-pane-header-style"/>

View file

@ -51,6 +51,9 @@ preferences-item-pane-header-style = Header Citation Style:
preferences-item-pane-header-locale = Header Language:
preferences-item-pane-header-missing-style = Missing style: <{ $shortName }>
preferences-item-pane-disable-alternating-rows =
.label = Disable alternating row colors
preferences-locate-library-lookup-intro = Library Lookup can find a resource online using your library’s OpenURL resolver.
preferences-locate-resolver = Resolver:
preferences-locate-base-url = Base URL:

View file

@ -79,8 +79,10 @@
.virtualized-table, .drag-image-container {
.row {
&.odd:not(.selected) {
background-color: var(--material-stripe);
@include state(".virtualized-table:not(.no-alternating-rows)") {
&.odd:not(.selected) {
background-color: var(--material-stripe);
}
}
&.even:not(.selected) {

View file

@ -68,8 +68,10 @@
.virtualized-table {
.row {
&.odd:not(.selected) {
background-color: var(--material-stripe);
@include state(".virtualized-table:not(.no-alternating-rows)") {
&.odd:not(.selected) {
background-color: var(--material-stripe);
}
}
&.even:not(.selected) {