mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Remove local mag_increment
This commit is contained in:
parent
ad7eddd520
commit
6249a3e61c
1 changed files with 6 additions and 8 deletions
|
|
@ -8,7 +8,7 @@
|
|||
#include "common/macros.h"
|
||||
|
||||
bool magnify_on;
|
||||
double mag_scale = 0.0, mag_increment = 0.0;
|
||||
double mag_scale = 0.0;
|
||||
|
||||
#define CLAMP(in, lower, upper) MAX(MIN(in, upper), lower)
|
||||
|
||||
|
|
@ -60,9 +60,6 @@ magnify(struct output *output, struct wlr_buffer *output_buffer, struct wlr_box
|
|||
if (mag_scale == 0.0) {
|
||||
mag_scale = theme->mag_scale;
|
||||
}
|
||||
if (mag_increment == 0.0) {
|
||||
mag_increment = theme->mag_increment;
|
||||
}
|
||||
|
||||
if (fullscreen) {
|
||||
width = output_buffer->width;
|
||||
|
|
@ -267,17 +264,18 @@ void
|
|||
magnify_set_scale(struct server *server, enum magnify_dir dir)
|
||||
{
|
||||
struct output *output = output_nearest_to_cursor(server);
|
||||
struct theme *theme = server->theme;
|
||||
|
||||
if (dir == MAGNIFY_INCREASE) {
|
||||
if (magnify_on) {
|
||||
mag_scale += mag_increment;
|
||||
mag_scale += theme->mag_increment;
|
||||
} else {
|
||||
magnify_on = true;
|
||||
mag_scale = 1.0 + mag_increment;
|
||||
mag_scale = 1.0 + theme->mag_increment;
|
||||
}
|
||||
} else {
|
||||
if (magnify_on && mag_scale > 1.0 + mag_increment) {
|
||||
mag_scale -= mag_increment;
|
||||
if (magnify_on && mag_scale > 1.0 + theme->mag_increment) {
|
||||
mag_scale -= theme->mag_increment;
|
||||
} else {
|
||||
magnify_on = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue