mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
Add screen magnifier
This adds a screen magnifier which can be controlled with the `ZoomIn` / `ZoomOut` and `ToggleMagnify` actions. It scales up part of the rendered framebuffer so the magnification may end up looking blurry depending on the magnification scale. PR #1774
This commit is contained in:
parent
ad15c0474d
commit
8ba066a1a5
13 changed files with 473 additions and 1 deletions
11
src/theme.c
11
src/theme.c
|
|
@ -571,6 +571,10 @@ theme_builtin(struct theme *theme, struct server *server)
|
|||
memset(theme->snapping_overlay_edge.border_color, 0,
|
||||
sizeof(theme->snapping_overlay_edge.border_color));
|
||||
theme->snapping_overlay_edge.border_color[0][0] = FLT_MIN;
|
||||
|
||||
/* magnifier */
|
||||
parse_hexstr("#ff0000", theme->mag_border_color);
|
||||
theme->mag_border_width = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -826,6 +830,13 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
if (match_glob(key, "snapping.overlay.edge.border.color")) {
|
||||
parse_hexstrs(value, theme->snapping_overlay_edge.border_color);
|
||||
}
|
||||
|
||||
if (match_glob(key, "magnifier.border.width")) {
|
||||
theme->mag_border_width = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "magnifier.border.color")) {
|
||||
parse_hexstr(value, theme->mag_border_color);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue