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

Commit 1f131db

Browse files
committed
Set a max width on waveform-less tiles
1 parent 5a75539 commit 1f131db

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

res/css/views/audio_messages/_PlaybackContainer.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@ limitations under the License.
4949
padding-right: 6px; // with the fixed width this ends up as a visual 8px most of the time, as intended.
5050
padding-left: 8px; // isolate from recording circle / play control
5151
}
52+
53+
&.mx_VoiceMessagePrimaryContainer_noWaveform {
54+
max-width: 162px; // with all the padding this results in 185px wide
55+
}
5256
}

src/components/views/audio_messages/RecordingPlayback.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ export default class RecordingPlayback extends React.PureComponent<IProps, IStat
6464
};
6565

6666
public render(): ReactNode {
67-
return <div className='mx_MediaBody mx_VoiceMessagePrimaryContainer'>
67+
const shapeClass = !this.isWaveformable ? 'mx_VoiceMessagePrimaryContainer_noWaveform' : '';
68+
return <div className={'mx_MediaBody mx_VoiceMessagePrimaryContainer ' + shapeClass}>
6869
<PlayPauseButton playback={this.props.playback} playbackPhase={this.state.playbackPhase} />
6970
<PlaybackClock playback={this.props.playback} />
7071
{ this.isWaveformable && <PlaybackWaveform playback={this.props.playback} /> }

0 commit comments

Comments
 (0)