a11y/zoom: Allow disabling scroll-shortcuts
This commit is contained in:
parent
b62e47ef8d
commit
83a7926748
2 changed files with 10 additions and 1 deletions
|
|
@ -133,6 +133,7 @@ pub struct ZoomConfig {
|
||||||
pub show_overlay: bool,
|
pub show_overlay: bool,
|
||||||
pub increment: u32,
|
pub increment: u32,
|
||||||
pub view_moves: ZoomMovement,
|
pub view_moves: ZoomMovement,
|
||||||
|
pub enable_mouse_zoom_shortcuts: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for ZoomConfig {
|
impl Default for ZoomConfig {
|
||||||
|
|
@ -142,6 +143,7 @@ impl Default for ZoomConfig {
|
||||||
show_overlay: true,
|
show_overlay: true,
|
||||||
increment: 50,
|
increment: 50,
|
||||||
view_moves: ZoomMovement::Continuously,
|
view_moves: ZoomMovement::Continuously,
|
||||||
|
enable_mouse_zoom_shortcuts: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -845,7 +845,14 @@ impl State {
|
||||||
if let Some(seat) = maybe_seat {
|
if let Some(seat) = maybe_seat {
|
||||||
self.common.idle_notifier_state.notify_activity(&seat);
|
self.common.idle_notifier_state.notify_activity(&seat);
|
||||||
|
|
||||||
if seat.get_keyboard().unwrap().modifier_state().logo {
|
if seat.get_keyboard().unwrap().modifier_state().logo
|
||||||
|
&& self
|
||||||
|
.common
|
||||||
|
.config
|
||||||
|
.cosmic_conf
|
||||||
|
.accessibility_zoom
|
||||||
|
.enable_mouse_zoom_shortcuts
|
||||||
|
{
|
||||||
if let Some(mut percentage) = event
|
if let Some(mut percentage) = event
|
||||||
.amount_v120(Axis::Vertical)
|
.amount_v120(Axis::Vertical)
|
||||||
.map(|val| val / 120.)
|
.map(|val| val / 120.)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue