mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Tidying
This commit is contained in:
parent
d2d301f98e
commit
56a86ffeed
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,6 @@
|
||||||
|
|
||||||
static bool magnify_on;
|
static bool magnify_on;
|
||||||
static double mag_scale = 0.0;
|
static double mag_scale = 0.0;
|
||||||
#define MAG_INCREMENT 0.2
|
|
||||||
|
|
||||||
struct wlr_surface *
|
struct wlr_surface *
|
||||||
lab_wlr_surface_from_node(struct wlr_scene_node *node)
|
lab_wlr_surface_from_node(struct wlr_scene_node *node)
|
||||||
|
|
@ -235,8 +234,8 @@ magnify(struct output *output, struct wlr_buffer *output_buffer, struct wlr_box
|
||||||
dst_box.x = 0;
|
dst_box.x = 0;
|
||||||
dst_box.y = 0;
|
dst_box.y = 0;
|
||||||
} else {
|
} else {
|
||||||
src_box.x = width * (mag_scale - 1) / (2 * mag_scale);
|
src_box.x = width * (mag_scale - 1.0) / (2.0 * mag_scale);
|
||||||
src_box.y = height * (mag_scale - 1) / (2 * mag_scale);
|
src_box.y = height * (mag_scale - 1.0) / (2.0 * mag_scale);
|
||||||
dst_box.x = ox - (width / 2);
|
dst_box.x = ox - (width / 2);
|
||||||
dst_box.y = oy - (height / 2);
|
dst_box.y = oy - (height / 2);
|
||||||
}
|
}
|
||||||
|
|
@ -305,6 +304,7 @@ magnify_toggle(void)
|
||||||
void
|
void
|
||||||
magnify_set_scale(enum magnify_dir dir)
|
magnify_set_scale(enum magnify_dir dir)
|
||||||
{
|
{
|
||||||
|
#define MAG_INCREMENT 0.2
|
||||||
if (dir == MAGNIFY_INCREASE) {
|
if (dir == MAGNIFY_INCREASE) {
|
||||||
if (magnify_on) {
|
if (magnify_on) {
|
||||||
mag_scale += MAG_INCREMENT;
|
mag_scale += MAG_INCREMENT;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue