Skip to content

Commit e2294af

Browse files
committed
[DDW-811] Normalize checkbox tick offset
1 parent fe5ad76 commit e2294af

File tree

7 files changed

+9
-40
lines changed

7 files changed

+9
-40
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
### Fixes
2727

28+
- Fixed checkbox tick offset ([PR 2751](https://github.com/input-output-hk/daedalus/pull/2751))
2829
- Fixed the Delegation popover timeout ([PR 2722](https://github.com/input-output-hk/daedalus/pull/2722))
2930
- Fixed issues relating to minimum window size in Daedalus ([PR 2719](https://github.com/input-output-hk/daedalus/pull/2719))
3031
- Updated "Trezor T" image shown on the "Pair a hardware wallet device" dialog ([PR 2712](https://github.com/input-output-hk/daedalus/pull/2712))

source/renderer/app/components/appUpdate/AppUpdateOverlay.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141

142142
&:after {
143143
border-color: var(--theme-news-overlay-update-background-color);
144-
margin: -3px 0 0;
145144
}
146145
}
147146

source/renderer/app/components/voting/voting-info/RegisterToVote.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import React, { useState } from 'react';
33
import { injectIntl } from 'react-intl';
44
import { Button } from 'react-polymorph/lib/components/Button';
5+
import { Checkbox } from 'react-polymorph/lib/components/Checkbox';
56
import {
67
VOTING_REGISTRATION_END_DATE,
78
NEXT_VOTING_FUND_NUMBER,
@@ -13,7 +14,6 @@ import {
1314
import type { Locale } from '../../../../../common/types/locales.types';
1415
import type { Intl } from '../../../types/i18nTypes';
1516
import styles from './RegisterToVote.scss';
16-
import { PatchCheckbox } from '../widgets/PatchCheckbox';
1717
import { messages } from './RegisterToVote.messages';
1818

1919
type Props = {
@@ -59,15 +59,15 @@ function RegisterToVote({
5959
{intl.formatMessage(messages.stepsTitle)}
6060
</span>
6161
<div className={styles.step}>
62-
<PatchCheckbox
62+
<Checkbox
6363
className={styles.checkbox}
6464
checked={step1}
6565
onChange={setStep1}
6666
label={intl.formatMessage(messages.step1CheckBoxLabel)}
6767
/>
6868
</div>
6969
<div className={styles.step}>
70-
<PatchCheckbox
70+
<Checkbox
7171
className={styles.checkbox}
7272
checked={step2}
7373
label={intl.formatMessage(messages.step2CheckBoxLabel)}

source/renderer/app/components/voting/voting-registration-wizard-steps/VotingRegistrationStepsQrCode.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { defineMessages, intlShape, FormattedHTMLMessage } from 'react-intl';
44
import QRCode from 'qrcode.react';
55
import { set } from 'lodash';
66
import { observer } from 'mobx-react';
7+
import { Checkbox } from 'react-polymorph/lib/components/Checkbox';
78
import VotingRegistrationDialog from './widgets/VotingRegistrationDialog';
89
import { NEXT_VOTING_FUND_NUMBER } from '../../../config/votingConfig';
9-
import { PatchCheckbox } from '../widgets/PatchCheckbox';
1010
import styles from './VotingRegistrationStepsQrCode.scss';
1111

1212
const messages = defineMessages({
@@ -173,13 +173,13 @@ export default class VotingRegistrationStepsQrCode extends Component<
173173
</div>
174174
<hr className={styles.separator} />
175175
<div className={styles.checkboxes}>
176-
<PatchCheckbox
176+
<Checkbox
177177
label={checkbox1Label}
178178
onChange={() => this.toggleAcceptance('isCheckbox1Accepted')}
179179
className={styles.checkbox}
180180
checked={isCheckbox1Accepted}
181181
/>
182-
<PatchCheckbox
182+
<Checkbox
183183
label={checkbox2Label}
184184
onChange={() => this.toggleAcceptance('isCheckbox2Accepted')}
185185
className={styles.checkbox}

source/renderer/app/components/voting/widgets/PatchCheckbox.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

source/renderer/app/components/voting/widgets/PatchCheckbox.scss

Lines changed: 0 additions & 7 deletions
This file was deleted.

source/renderer/app/themes/overrides/CheckboxOverrides.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
.root {
22
.check {
3+
border-radius: 3px;
34
height: var(--rp-checkbox-size);
45
width: var(--rp-checkbox-size);
56

67
&::after {
78
height: calc(22 / 2 * 1px);
89
margin-left: 1px;
9-
margin-top: var(--rp-checkbox-check-vertical-offset, -2px);
10+
margin-top: var(--rp-checkbox-check-vertical-offset, -3px);
1011
width: calc(22 / 5 * 1px);
1112
}
1213
}

0 commit comments

Comments
 (0)