overlays/eww: fix patch(?)
This commit is contained in:
parent
2d9161522f
commit
8577e9180d
1 changed files with 2 additions and 11 deletions
|
|
@ -2,15 +2,6 @@ diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widge
|
||||||
index 16f1f17d063..08d54cbe343 100644
|
index 16f1f17d063..08d54cbe343 100644
|
||||||
--- a/crates/eww/src/widgets/widget_definitions.rs
|
--- a/crates/eww/src/widgets/widget_definitions.rs
|
||||||
+++ b/crates/eww/src/widgets/widget_definitions.rs
|
+++ b/crates/eww/src/widgets/widget_definitions.rs
|
||||||
@@ -8,7 +8,7 @@ use crate::{
|
|
||||||
use anyhow::{anyhow, Context, Result};
|
|
||||||
use codespan_reporting::diagnostic::Severity;
|
|
||||||
use eww_shared_util::Spanned;
|
|
||||||
-use gdk::{ModifierType, NotifyType};
|
|
||||||
+use gdk::{ModifierType, NotifyType, ScrollDirection};
|
|
||||||
|
|
||||||
use glib::translate::FromGlib;
|
|
||||||
use gtk::{self, glib, prelude::*, DestDefaults, TargetEntry, TargetList};
|
|
||||||
@@ -679,11 +679,14 @@ fn build_gtk_event_box(bargs: &mut BuilderArgs) -> Result<gtk::EventBox> {
|
@@ -679,11 +679,14 @@ fn build_gtk_event_box(bargs: &mut BuilderArgs) -> Result<gtk::EventBox> {
|
||||||
// @prop onscroll - event to execute when the user scrolls with the mouse over the widget. The placeholder `{}` used in the command will be replaced with either `up` or `down`.
|
// @prop onscroll - event to execute when the user scrolls with the mouse over the widget. The placeholder `{}` used in the command will be replaced with either `up` or `down`.
|
||||||
prop(timeout: as_duration = Duration::from_millis(200), onscroll: as_string) {
|
prop(timeout: as_duration = Duration::from_millis(200), onscroll: as_string) {
|
||||||
|
|
@ -22,8 +13,8 @@ index 16f1f17d063..08d54cbe343 100644
|
||||||
- run_command(timeout, &onscroll, &[if delta < 0f64 { "up" } else { "down" }]);
|
- run_command(timeout, &onscroll, &[if delta < 0f64 { "up" } else { "down" }]);
|
||||||
+ connect_single_handler!(gtk_widget, gtk_widget.connect_scroll_event(move |_, evt| {
|
+ connect_single_handler!(gtk_widget, gtk_widget.connect_scroll_event(move |_, evt| {
|
||||||
+ let dir = match evt.direction() {
|
+ let dir = match evt.direction() {
|
||||||
+ ScrollDirection::Left => "up",
|
+ gdk::ScrollDirection::Left => "up",
|
||||||
+ ScrollDirection::Right => "down",
|
+ gdk::ScrollDirection::Right => "down",
|
||||||
+ _ => "",
|
+ _ => "",
|
||||||
+ };
|
+ };
|
||||||
+ if dir != "" {
|
+ if dir != "" {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue