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

Commit

Permalink
Merge pull request #5705 from luixxiul/refactoring-whiteButton
Browse files Browse the repository at this point in the history
Refactor buttons on about:preferences#payments and bookmark dialog
  • Loading branch information
luixxiul authored Nov 23, 2016
2 parents 05e1231 + 23207ed commit fb4a36d
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 35 deletions.
4 changes: 2 additions & 2 deletions app/renderer/components/addEditBookmarkHanger.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ class AddEditBookmarkHanger extends ImmutableComponent {
<div className='bookmarkButtons'>
{
this.props.originalDetail
? <Button l10nId='remove' className='primaryButton whiteButton inlineButton' onClick={this.onRemoveBookmark} />
? <Button l10nId='remove' className='removeButton whiteButton' onClick={this.onRemoveBookmark} />
: null
}
<Button l10nId='done' disabled={!this.bookmarkNameValid} className='primaryButton' onClick={this.onSave} />
<Button l10nId='done' disabled={!this.bookmarkNameValid} className='doneButton primaryButton' onClick={this.onSave} />
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ class PaymentsTab extends ImmutableComponent {
<span data-l10n-id='ledgerBackupContent' />
<div className='copyKeyContainer'>
<div className='copyContainer'>
<Button l10nId='copy' className='whiteButton inlineButton' onClick={this.copyToClipboard.bind(this, paymentId)} />
<Button l10nId='copy' className='copyButton whiteButton wideButton' onClick={this.copyToClipboard.bind(this, paymentId)} />
</div>
<div className='keyContainer'>
<h3 data-l10n-id='firstKey' />
Expand All @@ -1086,7 +1086,7 @@ class PaymentsTab extends ImmutableComponent {
</div>
<div className='copyKeyContainer'>
<div className='copyContainer'>
<Button l10nId='copy' className='whiteButton inlineButton' onClick={this.copyToClipboard.bind(this, passphrase)} />
<Button l10nId='copy' className='copyButton whiteButton wideButton' onClick={this.copyToClipboard.bind(this, passphrase)} />
</div>
<div className='keyContainer'>
<h3 data-l10n-id='secondKey' />
Expand Down Expand Up @@ -1298,7 +1298,7 @@ class PaymentsTab extends ImmutableComponent {
<span data-l10n-id='off' />
<SettingCheckbox dataL10nId='on' prefKey={settings.PAYMENTS_ENABLED} settings={this.props.settings} onChangeSetting={this.props.onChangeSetting} />
</div>
{ this.props.ledgerData.get('created') && this.enabled ? <Button l10nId='advancedSettings' className='advancedSettings whiteButton inlineButton' onClick={this.props.showOverlay.bind(this, 'advancedSettings')} /> : null }
{ this.props.ledgerData.get('created') && this.enabled ? <Button l10nId='advancedSettings' className='advancedSettings whiteButton inlineButton wideButton' onClick={this.props.showOverlay.bind(this, 'advancedSettings')} /> : null }
</div>
</div>
{
Expand Down
61 changes: 38 additions & 23 deletions less/about/preferences.less
Original file line number Diff line number Diff line change
Expand Up @@ -365,29 +365,35 @@ span.settingsListCopy {
}
}

span.browserButton.primaryButton {
&.addFunds {
span.browserButton {
&.advancedSettings {
font-size: 0.9em;
margin-right: 50px;
}

&.clearBrowsingDataButton,
&.importNowButton,
&.setAsDefaultButton,
&.manageAdblockSettings,
&.viewExtensionsInfo,
&.manageAutofillDataButton {
font-size: 0.9em;
margin-top: 20px;
padding: 5px 20px;
}
&.primaryButton {
&.addFunds {
font-size: 0.9em;
margin-right: 50px;
}

&.importNowButton {
margin-top: 5px;
}
&.clearBrowsingDataButton,
&.importNowButton,
&.setAsDefaultButton,
&.manageAdblockSettings,
&.viewExtensionsInfo,
&.manageAutofillDataButton {
font-size: 0.9em;
margin-top: 20px;
padding: 5px 20px;
}

&.setAsDefaultButton {
margin-top: 5px;
&.importNowButton {
margin-top: 5px;
}

&.setAsDefaultButton {
margin-top: 5px;
}
}
}

Expand Down Expand Up @@ -898,7 +904,7 @@ div.nextPaymentSubmission {
line-height: 1.3em;
}
span {
display: inline-block;
display: inline;
}
a {
text-decoration: none;
Expand Down Expand Up @@ -943,15 +949,21 @@ div.nextPaymentSubmission {

.copyKeyContainer {
display: flex;
align-items: flex-end;
justify-content: space-between;
width: 75%;
margin: 20px auto;

.copyContainer {
margin-top: 35px;
.copyButton {
font-size: 14px;
margin: 0;
}

}

.keyContainer {
margin-left: 75px;
margin-left: 1em;

h3 {
margin-bottom: 15px;
Expand Down Expand Up @@ -992,8 +1004,11 @@ div.nextPaymentSubmission {
}

.advancedSettingsFooter {
padding: 20px 100px;
text-align: right;
padding-top: 20px;
padding-bottom: 20px;
display: flex;
flex-wrap: wrap;
justify-content: center;
}

.recoveryOverlay {
Expand Down
12 changes: 5 additions & 7 deletions less/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
line-height: 22px;
margin: 5px 5px 0px 0px;
padding: 0px 20px;
white-space: nowrap;
}

span.buttonSeparator {
Expand All @@ -35,8 +36,6 @@ span.menuButton {
}
}

a.browserButton,
span.browserButton,
.browserButton {
cursor: default;
display: inline-block;
Expand Down Expand Up @@ -91,7 +90,8 @@ span.browserButton,
&.wideButton,
&.secondaryButton,
&.secondaryAltButton,
&.subtleButton {
&.subtleButton,
&.whiteButton {
.buttonCommon;
width: auto;
height: auto;
Expand Down Expand Up @@ -121,20 +121,18 @@ span.browserButton,
display: block;
margin-right: 0px;
margin-left: 0px;
width: auto;
padding: 3px 35px;
}

&.whiteButton {
background: linear-gradient(white, @lightGray);
border: 2px solid white;
box-shadow: @buttonShadow;
cursor: pointer;
display: block;
font-weight: normal;
font-style: normal;
font-size: 14px;
color: @darkGray;
width: auto;
padding: 3px 35px;
}

&.inlineButton {
Expand Down
4 changes: 4 additions & 0 deletions less/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,10 @@

.bookmarkButtons {
margin: 20px 0 10px 0;

.doneButton {
margin-right: 0;
}
}

.bookmarkFormInner {
Expand Down
8 changes: 8 additions & 0 deletions less/navigationBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,14 @@
}

#navigator {
.bookmarkButtons {
display: flex;

.removeButton {
flex-grow: 1;
}
}

.stopButton,
.reloadButton,
.homeButton {
Expand Down

0 comments on commit fb4a36d

Please sign in to comment.