diff --git a/app/renderer/components/common/settings.js b/app/renderer/components/common/settings.js index 60c6d7772dc..f7220da80f8 100644 --- a/app/renderer/components/common/settings.js +++ b/app/renderer/components/common/settings.js @@ -90,8 +90,8 @@ class SettingCheckbox extends ImmutableComponent { const labelClass = cx({ [css(settingCheckboxStyles.label)]: this.props.small, - [this.props.labelClassName]: !!this.props.labelClassName - + [this.props.labelClassName]: !!this.props.labelClassName, + [css(settingCheckboxStyles.expansiveRightText)]: !this.props.compact }) return
@@ -101,11 +101,9 @@ class SettingCheckbox extends ImmutableComponent { onClick={this.onClick} checkedOn={this.props.checked !== undefined ? this.props.checked : getSetting(this.props.prefKey, this.props.settings)} className={this.props.switchClassName} - /> -
@@ -115,6 +113,9 @@ class SettingCheckbox extends ImmutableComponent { const settingCheckboxStyles = StyleSheet.create({ label: { fontSize: 'smaller' + }, + expansiveRightText: { + paddingLeft: '9px' } }) diff --git a/app/renderer/components/main/findbar.js b/app/renderer/components/main/findbar.js index d0cbfb8814c..8a4c2edcd54 100644 --- a/app/renderer/components/main/findbar.js +++ b/app/renderer/components/main/findbar.js @@ -4,6 +4,7 @@ const React = require('react') const Immutable = require('immutable') +const {StyleSheet, css} = require('aphrodite') // Components const ReduxComponent = require('../reduxComponent') @@ -24,6 +25,7 @@ const {getTextColorForBackground} = require('../../../../js/lib/color') const frameStateUtil = require('../../../../js/state/frameStateUtil') const {getSetting} = require('../../../../js/settings') const debounce = require('../../../../js/lib/debounce') +const cx = require('../../../../js/lib/classSet') // Styles const globalStyles = require('../styles/global') @@ -224,16 +226,18 @@ class FindBar extends React.Component { render () { let findBarStyle = {} - let findBarTextStyle = {} + let findBarTextStyles = {} if (this.props.backgroundColor) { + findBarTextStyles = StyleSheet.create({ + matchingTextColor: { + color: this.props.textColor + } + }) findBarStyle = { background: this.props.backgroundColor, color: this.props.textColor } - findBarTextStyle = { - color: this.props.textColor - } } return
@@ -275,16 +279,15 @@ class FindBar extends React.Component { id='caseSensitivityCheckbox' checkedOn={this.props.isCaseSensitive} onClick={this.onCaseSensitivityChange} - /> -
+ diff --git a/app/renderer/components/preferences/payment/ledgerTable.js b/app/renderer/components/preferences/payment/ledgerTable.js index 270c5ce7778..98ec64a0bf7 100644 --- a/app/renderer/components/preferences/payment/ledgerTable.js +++ b/app/renderer/components/preferences/payment/ledgerTable.js @@ -264,7 +264,7 @@ class LedgerTable extends ImmutableComponent {
- -
+
-
label { - vertical-align: middle; - } - - .switchControlText { - margin: auto 0; - } - - .switchControlLeftText { - margin: auto 5px auto 0; - } - - .switchControlRightText { - margin: auto 0 auto 5px; - } - - .switchControlTopText { - margin: 0 auto 5px auto; - } - - .switchControlRight { - display: flex; - } - - .switchMiddle { - display: flex; - flex-direction: column; - } - - .switchBackground { - background-color: @switchBG_off; - border-radius: 12px; - height: @switchHeight; - position: relative; - width: @switchWidth; - box-shadow: @switchShadow; - - .switchIndicator { - background-color: white; - border-radius: 100%; - height: @switchNubDiameter; - position: absolute; - top: @switchNubTopMargin; - width: @switchNubDiameter; - box-shadow: @switchNubShadow; - } - } -} - .widevineInfo { line-height: 1.3em; diff --git a/less/switchControls.less b/less/switchControls.less index 597b8266e41..ad85e541622 100644 --- a/less/switchControls.less +++ b/less/switchControls.less @@ -36,6 +36,19 @@ } } } + + &.small { + .switchBackground { + height: @smallSwitchHeight; + width: @smallSwitchWidth; + .switchIndicator { + height: @smallSwitchNubDiameter; + width: @smallSwitchNubDiameter; + top: 1px; + right: calc(@smallSwitchWidth - @smallSwitchNubDiameter - @switchNubRightMargin); + } + } + } .switchControlText { margin: auto 0;