Skip to content
Open
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 src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ body {

.App__playButton-container {
display: flex;
gap: 0.5rem;
gap: 1rem;
}

.App__playControlButton {
Expand Down
3 changes: 2 additions & 1 deletion src/PlayButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class PlayButton extends React.Component<PlayButtonProps, {}> {
render() {
const classes = classNames(
this.props.className,
'PlayControlButton',
'PlayButton',
this.props.interpreterIsRunning && 'PlayButton--pause',
!this.props.interpreterIsRunning && 'PlayButton--play'
Expand All @@ -32,7 +33,7 @@ class PlayButton extends React.Component<PlayButtonProps, {}> {
this.props.intl.formatMessage({id:'PlayButton.pause'}) :
this.props.intl.formatMessage({id:'PlayButton.play'})}
className={classes}
disabledClassName='PlayButton--disabled'
disabledClassName='PlayButton--disabled PlayControlButton--disabled'
disabled={this.props.disabled}
onClick={this.props.onClick}
>
Expand Down
62 changes: 8 additions & 54 deletions src/PlayButton.scss
Original file line number Diff line number Diff line change
@@ -1,67 +1,21 @@
@import 'variables';

button.btn.PlayButton {
width: 3.5rem;
height: 3.5rem;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
margin-right: 0.5rem;
border: none;
margin-right: 0;
border-radius: 50%;
background-color: transparent;
border: 0;
padding: 0;
padding-top: 0.05rem;

svg circle {
svg .playControls {
fill: #1E1E1E;
}

svg path.triangle {
fill: #1E1E1E;
}
}

button.btn.PlayButton:focus {
box-shadow: 0 0 0 $c2lc-focus-indicator-width #FFFFFF;
}

button.btn.PlayButton:hover {
svg path.inner-circle {
fill: #F1AE5B;
}
}

button.btn.PlayButton svg {
height: 3.5rem;
width: 3.5rem;

circle {
fill: #1E1E1E;
}
}

button.btn.PlayButton--play.PlayButton--disabled {
background-color: inherit;
cursor: default;

svg {
path.triangle {
fill: #67717E;
}

circle {
fill: #9DA4AF;
}

path.inner-circle {
fill: #B9BEC6;
}
}
}

button.btn.PlayButton--play.PlayButton--disabled svg {
fill: $c2lc-disabled-foreground-color;
}

button.btn.PlayButton--play.PlayButton--disabled:active:focus {
background-color: $c2lc-primary-button-color;
box-shadow: 0 0 0 $c2lc-focus-indicator-width $c2lc-focus-indicator-color;
}
height: 1.4rem;
width: 1.4rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to make the pause bars and triangle appear too far to the left. The height and width of the SVGs are not equal, so you either need to add padding to make them equal or adjust the width here to be proportionate.

Copy link
Contributor

@the-t-in-rtf the-t-in-rtf Nov 26, 2021

Choose a reason for hiding this comment

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

Actually, the pause bar SVG is square, so maybe it's just the position of the paths within the SVG and padding would fix it.

}
4 changes: 2 additions & 2 deletions src/RefreshButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class RefreshButton extends React.Component<RefreshButtonProps, {}> {
return (
<IconButton
ariaLabel={this.props.intl.formatMessage({id:'RefreshButton'})}
className='RefreshButton'
disabledClassName='RefreshButton--disabled'
className='RefreshButton PlayControlButton'
disabledClassName='RefreshButton--disabled PlayControlButton--disabled'
disabled={this.props.disabled}
onClick={this.props.onClick}
>
Expand Down
34 changes: 0 additions & 34 deletions src/RefreshButton.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,7 @@
}

.RefreshButton {
background-color: inherit;
margin: auto 0;

svg {
path {
fill: #1E1E1E;
}
path.inner-circle {
fill: #F97953;
}
}

&:focus {
box-shadow: 0 0 0 $c2lc-focus-indicator-width #FFFFFF;
}

&:hover:not(.RefreshButton--disabled) {
background-color: inherit;
svg path.inner-circle {
fill: #F1AE5B;
}
}

&:hover:not(:focus) {
box-shadow: none;
}
}

.RefreshButton.RefreshButton--disabled,
Expand All @@ -45,15 +20,6 @@
stroke: #9DA4AF;
}

circle {
stroke: none;
fill: #9DA4AF;
}

path.inner-circle {
fill: #B9BEC6;
}

rect.refresh-icon {
stroke: #9DA4AF;
fill: #B9BEC6;
Expand Down
4 changes: 2 additions & 2 deletions src/StopButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { injectIntl } from 'react-intl';
import type { IntlShape } from 'react-intl';
import IconButton from './IconButton';
import { ReactComponent as StopIcon } from './svg/Stop.svg';
import './StopButton.scss';

type StopButtonProps = {
intl: IntlShape,
Expand All @@ -19,13 +18,14 @@ class StopButton extends React.Component<StopButtonProps, {}> {
render() {
const classes = classNames(
this.props.className,
'PlayControlButton',
'StopButton'
);
return (
<IconButton
ariaLabel={`${this.props.intl.formatMessage({id:'StopButton'})}`}
className={classes}
disabledClassName='StopButton--disabled'
disabledClassName='StopButton--disabled PlayControlButton--disabled'
disabled={this.props.disabled}
onClick={this.props.onClick}
>
Expand Down
41 changes: 0 additions & 41 deletions src/StopButton.scss

This file was deleted.

Loading