Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Polish bravery panel #10489

Merged
merged 1 commit into from
Sep 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/renderer/components/common/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const styles = StyleSheet.create({
height: '2rem',
outline: 'none',
// right padding is larger, to account for the down arrow SVG
padding: `${selectPadding} 1.5em ${selectPadding} ${selectPadding}`,
padding: `${selectPadding} 2em ${selectPadding} ${selectPadding}`,
'-webkit-appearance': 'none',
width: 'auto'
},
Expand Down
12 changes: 9 additions & 3 deletions app/renderer/components/main/braveryPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ class BraveryPanel extends React.Component {
<SwitchControl className={css(
!this.props.isCompactBraveryPanel && gridStyles.row6col1,
this.props.isCompactBraveryPanel && gridStyles.row8col1,
!this.props.isCompactBraveryPanel && styles.braveryPanel__body__advanced__control__switchControl_noScript,
this.props.isCompactBraveryPanel && styles.braveryPanel_compact__body__advanced__control__switchControl
)}
onClick={this.onToggleNoScript}
Expand Down Expand Up @@ -727,13 +728,13 @@ const buttonSize = '13px'
const styles = StyleSheet.create({
braveryPanel: {
padding: 0,
width: '500px',
right: '20px',
userSelect: 'none',
cursor: 'default',
color: globalStyles.braveryPanel.color,
overflowY: 'auto',
maxHeight: `calc(100% - ${globalStyles.spacing.dialogTopOffset})`
maxHeight: `calc(100% - ${globalStyles.spacing.dialogTopOffset})`,
maxWidth: 'calc(100% - 40px)'
},
braveryPanel_compact: {
width: 'auto',
Expand Down Expand Up @@ -993,6 +994,7 @@ const styles = StyleSheet.create({
braveryPanel__body__advanced__control: {
display: 'grid',
gridColumnGap: '1rem',
gridTemplateColumns: 'max-content max-content',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents the strings inside the dropdowns and the labels from wrapping, without forcing the same width for each column.

margin: '15px 10px'
},
braveryPanel__body__advanced__control__forms__title: {
Expand All @@ -1009,6 +1011,9 @@ const styles = StyleSheet.create({
alignItems: 'center',
justifyContent: 'space-between'
},
braveryPanel__body__advanced__control__switchControl_noScript: {
marginTop: '2.5px'
},
braveryPanel__body__advanced__control__switchControl__infoButton: {
display: 'inline',
cursor: 'pointer',
Expand All @@ -1018,12 +1023,13 @@ const styles = StyleSheet.create({

// controlWrapper - Normal Panel
braveryPanel__body__advanced__control__forms__dropdown: {
marginBottom: '25px'
marginBottom: '1rem'
},

// controlWrapper - Compact Panel
braveryPanel_compact__body__advanced__control: {
gridColumnGap: 0,
gridTemplateColumns: 'initial',
margin: 0,

// Align the advanced control wrapper with the counters
Expand Down