a11y/zoom: zoom level per output
This commit is contained in:
parent
babb96ddfa
commit
0ba0a0cdaa
11 changed files with 154 additions and 117 deletions
|
|
@ -1027,10 +1027,11 @@ impl State {
|
|||
}
|
||||
|
||||
pub fn update_zoom(&mut self, seat: &Seat<State>, change: f64, animate: bool) {
|
||||
let output = seat.active_output();
|
||||
let mut shell = self.common.shell.write().unwrap();
|
||||
let (zoom_seat, current_level) = shell
|
||||
.zoom_state()
|
||||
.map(|state| (state.current_seat(), state.current_level()))
|
||||
.map(|state| (state.current_seat(), state.current_level(&output)))
|
||||
.unwrap_or_else(|| (seat.clone(), 1.0));
|
||||
|
||||
if current_level == 1. && change <= 0. {
|
||||
|
|
@ -1041,6 +1042,7 @@ impl State {
|
|||
let new_level = (current_level + change).max(1.0);
|
||||
shell.trigger_zoom(
|
||||
&seat,
|
||||
Some(&output),
|
||||
new_level,
|
||||
&self.common.config.cosmic_conf.accessibility_zoom,
|
||||
animate,
|
||||
|
|
|
|||
|
|
@ -2247,7 +2247,7 @@ where
|
|||
B::Device: 'static,
|
||||
{
|
||||
let geometry = zoom_state
|
||||
.and_then(|state| output.zoomed_geometry(state.current_level()))
|
||||
.and_then(|_| output.zoomed_geometry())
|
||||
.unwrap_or_else(|| output.geometry());
|
||||
let transform = output.current_transform();
|
||||
let size = transform
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue