Make Preferences > Shortcuts two columns on large screens

This commit is contained in:
Ben Gotow 2020-02-16 20:48:20 -06:00
parent c400a9a4b1
commit 79c437d01f
5 changed files with 40 additions and 21 deletions

View file

@ -76,9 +76,9 @@ class PreferencesTabsBar extends React.Component<PreferencesTabBarProps> {
return ( return (
<div className="container-preference-tabs"> <div className="container-preference-tabs">
<Flexbox direction="row" className="preferences-tabs"> <Flexbox direction="row" className="preferences-tabs">
<div style={{ flex: 1 }} /> <div style={{ flex: 0.5 }} />
{this.renderTabs()} {this.renderTabs()}
<div style={{ flex: 1 }} /> <div style={{ flex: 0.5 }} />
</Flexbox> </Flexbox>
</div> </div>
); );

View file

@ -30,6 +30,18 @@ export default [
['core:remove-and-next', localized('Remove and show next')], ['core:remove-and-next', localized('Remove and show next')],
], ],
}, },
{
title: localized('Selection'),
items: [
['core:select-item', localized('Select conversation')],
['multiselect-list:select-all', localized('Select all conversations')],
['multiselect-list:deselect-all', localized('Deselect all conversations')],
['thread-list:select-read', localized('Select all read conversations')],
['thread-list:select-unread', localized('Select all unread conversations')],
['thread-list:select-starred', localized('Select all starred conversations')],
['thread-list:select-unstarred', localized('Select all unstarred conversations')],
],
},
{ {
title: localized('Composer'), title: localized('Composer'),
items: [ items: [
@ -61,18 +73,6 @@ export default [
['core:find-in-thread', localized('Find in thread')], ['core:find-in-thread', localized('Find in thread')],
], ],
}, },
{
title: localized('Selection'),
items: [
['core:select-item', localized('Select conversation')],
['multiselect-list:select-all', localized('Select all conversations')],
['multiselect-list:deselect-all', localized('Deselect all conversations')],
['thread-list:select-read', localized('Select all read conversations')],
['thread-list:select-unread', localized('Select all unread conversations')],
['thread-list:select-starred', localized('Select all starred conversations')],
['thread-list:select-unstarred', localized('Select all unstarred conversations')],
],
},
{ {
title: localized('Jumping'), title: localized('Jumping'),
items: [ items: [

View file

@ -57,7 +57,7 @@ class PreferencesGeneral extends React.Component<{
render() { render() {
return ( return (
<div className="container-general" style={{ maxWidth: 800 }}> <div className="container-general">
<div style={{ display: 'flex' }}> <div style={{ display: 'flex' }}>
<div style={{ width: '50%', paddingRight: 15 }}> <div style={{ width: '50%', paddingRight: 15 }}>
<WorkspaceSection config={this.props.config} configSchema={this.props.configSchema} /> <WorkspaceSection config={this.props.config} configSchema={this.props.configSchema} />

View file

@ -132,12 +132,20 @@ export default class PreferencesKeymaps extends React.Component<
{localized('Restore Defaults')} {localized('Restore Defaults')}
</button> </button>
</Flexbox> </Flexbox>
<p> <p style={{ maxWidth: 600 }}>
{localized( {localized(
'You can choose a shortcut set to use keyboard shortcuts of familiar email clients. To edit a shortcut, click it in the list below and enter a replacement on the keyboard.' 'You can choose a shortcut set to use keyboard shortcuts of familiar email clients. To edit a shortcut, click it in the list below and enter a replacement on the keyboard.'
)} )}
</p> </p>
{displayedKeybindings.map(this._renderBindingsSection)} <div className="keymaps-columns-flexbox">
<div style={{ flex: 1 }}>
{displayedKeybindings.slice(0, 3).map(this._renderBindingsSection)}
</div>
<div style={{ width: 30 }} />
<div style={{ flex: 1 }}>
{displayedKeybindings.slice(3).map(this._renderBindingsSection)}
</div>
</div>
</section> </section>
<section> <section>
<h2>{localized('Customization')}</h2> <h2>{localized('Customization')}</h2>

View file

@ -120,8 +120,9 @@
} }
.container-general { .container-general {
width: 80%; width: 100%;
min-width: 430px; min-width: 430px;
max-width: 800px;
margin: 0 auto; margin: 0 auto;
.local-data { .local-data {
@ -192,8 +193,9 @@
} }
.container-keymaps { .container-keymaps {
width: 40%; width: 100%;
min-width: 460px; max-width: 800px;
min-width: 430px;
margin: 0 auto; margin: 0 auto;
.col-left { .col-left {
@ -209,6 +211,10 @@
} }
} }
.keymaps-columns-flexbox {
display: flex;
}
.shortcut-section-title { .shortcut-section-title {
border-bottom: 1px solid @border-color-divider; border-bottom: 1px solid @border-color-divider;
margin: @padding-large-vertical * 1.5 0; margin: @padding-large-vertical * 1.5 0;
@ -297,8 +303,13 @@ body.platform-linux {
} }
} }
@media (max-width: 600px) { @media (max-width: 680px) {
.preferences-wrap { .preferences-wrap {
.container-keymaps {
.keymaps-columns-flexbox {
flex-direction: column;
}
}
.container-preference-tabs { .container-preference-tabs {
.preferences-tabs .item img.tab-icon { .preferences-tabs .item img.tab-icon {
margin-bottom: 10px; margin-bottom: 10px;