Changed slider colors from volume menu item in group calls.
This commit is contained in:
parent
ef1a4e4ce3
commit
130b8bc83c
|
@ -788,7 +788,14 @@ groupCallMuteCrossLine: CrossLineAnimation {
|
|||
|
||||
groupCallMenuSpeakerArcsSkip: 1px;
|
||||
groupCallMenuVolumeSkip: 5px;
|
||||
groupCallMenuVolumeSkipSlider: defaultContinuousSlider;
|
||||
groupCallMenuVolumeSlider: MediaSlider(defaultContinuousSlider) {
|
||||
activeFg: groupCallMembersFg;
|
||||
inactiveFg: groupCallMemberInactiveIcon;
|
||||
activeFgOver: groupCallMembersFg;
|
||||
inactiveFgOver: groupCallMemberInactiveIcon;
|
||||
activeFgDisabled: groupCallMemberInactiveIcon;
|
||||
receivedTillFg: groupCallMemberInactiveIcon;
|
||||
}
|
||||
|
||||
groupCallSpeakerArcsAnimation: ArcsAnimation {
|
||||
fg: groupCallIconFg;
|
||||
|
|
|
@ -40,7 +40,7 @@ MenuVolumeItem::MenuVolumeItem(
|
|||
, _localMuted(muted)
|
||||
, _slider(base::make_unique_q<Ui::MediaSlider>(
|
||||
this,
|
||||
st::groupCallMenuVolumeSkipSlider))
|
||||
st::groupCallMenuVolumeSlider))
|
||||
, _dummyAction(new QAction(parent))
|
||||
, _st(st)
|
||||
, _stCross(st::groupCallMuteCrossLine)
|
||||
|
@ -54,6 +54,8 @@ MenuVolumeItem::MenuVolumeItem(
|
|||
initResizeHook(parent->sizeValue());
|
||||
enableMouseSelecting();
|
||||
|
||||
_slider->setAlwaysDisplayMarker(true);
|
||||
|
||||
sizeValue(
|
||||
) | rpl::start_with_next([=](const QSize &size) {
|
||||
const auto geometry = QRect(QPoint(), size);
|
||||
|
@ -75,8 +77,11 @@ MenuVolumeItem::MenuVolumeItem(
|
|||
) | rpl::start_with_next([=](const QRect &clip) {
|
||||
Painter p(this);
|
||||
|
||||
const auto volume = _localMuted
|
||||
? 0
|
||||
: std::round(_slider->value() * kMaxVolumePercent);
|
||||
const auto muteProgress =
|
||||
_crossLineAnimation.value(_localMuted ? 1. : 0.);
|
||||
_crossLineAnimation.value((!volume) ? 1. : 0.);
|
||||
|
||||
const auto selected = isSelected();
|
||||
p.fillRect(clip, selected ? st.itemBgOver : st.itemBg);
|
||||
|
@ -87,9 +92,6 @@ MenuVolumeItem::MenuVolumeItem(
|
|||
muteProgress);
|
||||
p.setPen(mutePen);
|
||||
p.setFont(_st.itemStyle.font);
|
||||
const auto volume = _localMuted
|
||||
? 0
|
||||
: std::round(_slider->value() * kMaxVolumePercent);
|
||||
p.drawText(_volumeRect, u"%1%"_q.arg(volume), style::al_center);
|
||||
|
||||
_crossLineMute->paint(
|
||||
|
|
Loading…
Reference in New Issue