mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #93 from Robinhuett/pulseaudio_scroll
Add config option for volume change scroll step size
This commit is contained in:
commit
315e2defde
@ -63,6 +63,7 @@
|
|||||||
"format-disconnected": "Disconnected ⚠"
|
"format-disconnected": "Disconnected ⚠"
|
||||||
},
|
},
|
||||||
"pulseaudio": {
|
"pulseaudio": {
|
||||||
|
//"scroll-step": 1,
|
||||||
"format": "{volume}% {icon}",
|
"format": "{volume}% {icon}",
|
||||||
"format-bluetooth": "{volume}% {icon}",
|
"format-bluetooth": "{volume}% {icon}",
|
||||||
"format-muted": "",
|
"format-muted": "",
|
||||||
|
@ -74,8 +74,7 @@ void waybar::modules::Pulseaudio::contextStateCb(pa_context *c, void *data)
|
|||||||
bool waybar::modules::Pulseaudio::handleScroll(GdkEventScroll *e) {
|
bool waybar::modules::Pulseaudio::handleScroll(GdkEventScroll *e) {
|
||||||
// Avoid concurrent scroll event
|
// Avoid concurrent scroll event
|
||||||
bool direction_up = false;
|
bool direction_up = false;
|
||||||
// XXX/TODO: Change of 100 corresponds to 1%, does that always hold true?
|
uint16_t change = config_["scroll-step"].isUInt() ? config_["scroll-step"].asUInt() * 100 : 100;
|
||||||
uint16_t change = 100;
|
|
||||||
pa_cvolume pa_volume = pa_volume_;
|
pa_cvolume pa_volume = pa_volume_;
|
||||||
|
|
||||||
if (scrolling_) {
|
if (scrolling_) {
|
||||||
|
Loading…
Reference in New Issue
Block a user