Files
tdesktop/Telegram/SourceFiles/media/player/media_player_volume_controller.h
allhaileris afb81b8278
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
init
2026-02-16 15:50:16 +03:00

53 lines
1.1 KiB
C++

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
#include "ui/rp_widget.h"
#include "base/object_ptr.h"
class QWheelEvent;
namespace Ui {
class MediaSlider;
} // namespace Ui
namespace Window {
class SessionController;
} // namespace Window
namespace Media::Player {
class Dropdown;
class VolumeController final : public Ui::RpWidget {
public:
VolumeController(
QWidget *parent,
not_null<Window::SessionController*> controller);
void setIsVertical(bool vertical);
void outerWheelEvent(not_null<QWheelEvent*> e);
protected:
void resizeEvent(QResizeEvent *e) override;
private:
void setVolume(float64 volume);
void applyVolumeChange(float64 volume);
object_ptr<Ui::MediaSlider> _slider;
};
void PrepareVolumeDropdown(
not_null<Dropdown*> dropdown,
not_null<Window::SessionController*> controller,
rpl::producer<not_null<QWheelEvent*>> outerWheelEvents);
} // namespace Media::Player