fix: make audio player thumb color consistent

This commit is contained in:
ggurdin 2026-02-12 10:50:04 -05:00
parent 9c68ce6982
commit 835bd4e009
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -599,46 +599,63 @@ class AudioPlayerState extends State<AudioPlayerWidget> {
),
SizedBox(
height: 32,
child: Slider(
// #Pangea
// thumbColor:
// widget.event.senderId ==
// widget.event.room.client.userID
// ? theme.colorScheme.onPrimary
// : theme.colorScheme.primary,
thumbColor:
widget.senderId ==
Matrix.of(context).client.userID
? widget.color
: theme.colorScheme.onSurface,
// #Pangea
child: SliderTheme(
data: SliderTheme.of(context).copyWith(
thumbColor:
widget.senderId ==
Matrix.of(context).client.userID
? widget.color
: theme.colorScheme.onSurface,
disabledThumbColor:
widget.senderId ==
Matrix.of(context).client.userID
? widget.color
: theme.colorScheme.onSurface,
activeTrackColor: waveform == null
? widget.color
: Colors.transparent,
inactiveTrackColor: waveform == null
? widget.color.withAlpha(128)
: Colors.transparent,
),
// Pangea#
activeColor: waveform == null
? widget.color
: Colors.transparent,
inactiveColor: waveform == null
? widget.color.withAlpha(128)
: Colors.transparent,
max: maxPosition,
value: currentPosition,
// #Pangea
onChanged: !widget.enableClicks
? null
: (position) => audioPlayer == null
? _onButtonTap()
: audioPlayer.seek(
Duration(
milliseconds: position
.round(),
child: Slider(
// #Pangea
// thumbColor:
// widget.event.senderId ==
// widget.event.room.client.userID
// ? theme.colorScheme.onPrimary
// : theme.colorScheme.primary,
// activeColor: waveform == null
// ? widget.color
// : Colors.transparent,
// inactiveColor: waveform == null
// ? widget.color.withAlpha(128)
// : Colors.transparent,
// Pangea#
max: maxPosition,
value: currentPosition,
// #Pangea
onChanged: !widget.enableClicks
? null
: (position) => audioPlayer == null
? _onButtonTap()
: audioPlayer.seek(
Duration(
milliseconds: position
.round(),
),
),
),
// onChanged: (position) => audioPlayer == null
// ? _onButtonTap()
// : audioPlayer.seek(
// Duration(
// milliseconds: position.round(),
// ),
// ),
// Pangea#
// onChanged: (position) => audioPlayer == null
// ? _onButtonTap()
// : audioPlayer.seek(
// Duration(
// milliseconds: position.round(),
// ),
// ),
// Pangea#
),
),
),
],