mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
overlay: s/preview/overlay/
Replace "preview" in rc.xml and themerc with "overlay" since "preview" sounds like it shows the window content. Breaking changes are: - `snapping.preview.*` in themerc is now replaced with `snapping.overlay`. - `<snapping><preview>` in rc.xml is now replaced with `<snapping><overlay>`.
This commit is contained in:
parent
3f10857496
commit
34290ef629
9 changed files with 97 additions and 97 deletions
|
|
@ -929,12 +929,12 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
rc.window_edge_strength = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "range.snapping")) {
|
||||
rc.snap_edge_range = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "enabled.preview.snapping")) {
|
||||
set_bool(content, &rc.snap_preview_enabled);
|
||||
} else if (!strcasecmp(nodename, "inner.delay.preview.snapping")) {
|
||||
rc.snap_preview_delay_inner = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "outer.delay.preview.snapping")) {
|
||||
rc.snap_preview_delay_outer = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "enabled.overlay.snapping")) {
|
||||
set_bool(content, &rc.snap_overlay_enabled);
|
||||
} else if (!strcasecmp(nodename, "inner.delay.overlay.snapping")) {
|
||||
rc.snap_overlay_delay_inner = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "outer.delay.overlay.snapping")) {
|
||||
rc.snap_overlay_delay_outer = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "topMaximize.snapping")) {
|
||||
set_bool(content, &rc.snap_top_maximize);
|
||||
} else if (!strcasecmp(nodename, "notifyClient.snapping")) {
|
||||
|
|
@ -1218,9 +1218,9 @@ rcxml_init(void)
|
|||
rc.window_edge_strength = 20;
|
||||
|
||||
rc.snap_edge_range = 1;
|
||||
rc.snap_preview_enabled = true;
|
||||
rc.snap_preview_delay_inner = 500;
|
||||
rc.snap_preview_delay_outer = 500;
|
||||
rc.snap_overlay_enabled = true;
|
||||
rc.snap_overlay_delay_inner = 500;
|
||||
rc.snap_overlay_delay_outer = 500;
|
||||
rc.snap_top_maximize = true;
|
||||
rc.snap_tiling_events_mode = LAB_TILING_EVENTS_ALWAYS;
|
||||
|
||||
|
|
|
|||
|
|
@ -48,15 +48,15 @@ void overlay_reconfigure(struct seat *seat)
|
|||
|
||||
struct theme *theme = seat->server->theme;
|
||||
create_overlay_rect(seat, &seat->overlay.region_rect,
|
||||
theme->snapping_preview_region_fill,
|
||||
theme->snapping_preview_region_bg_color,
|
||||
theme->snapping_preview_region_border_width,
|
||||
theme->snapping_preview_region_border_color);
|
||||
theme->snapping_overlay_region_fill,
|
||||
theme->snapping_overlay_region_bg_color,
|
||||
theme->snapping_overlay_region_border_width,
|
||||
theme->snapping_overlay_region_border_color);
|
||||
create_overlay_rect(seat, &seat->overlay.edge_rect,
|
||||
theme->snapping_preview_edge_fill,
|
||||
theme->snapping_preview_edge_bg_color,
|
||||
theme->snapping_preview_edge_border_width,
|
||||
theme->snapping_preview_edge_border_color);
|
||||
theme->snapping_overlay_edge_fill,
|
||||
theme->snapping_overlay_edge_bg_color,
|
||||
theme->snapping_overlay_edge_border_width,
|
||||
theme->snapping_overlay_edge_border_color);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -188,7 +188,7 @@ static void
|
|||
show_edge_overlay(struct seat *seat, enum view_edge edge,
|
||||
struct output *output)
|
||||
{
|
||||
if (!rc.snap_preview_enabled) {
|
||||
if (!rc.snap_overlay_enabled) {
|
||||
return;
|
||||
}
|
||||
if (seat->overlay.active.edge == edge
|
||||
|
|
@ -201,9 +201,9 @@ show_edge_overlay(struct seat *seat, enum view_edge edge,
|
|||
|
||||
int delay;
|
||||
if (edge_has_adjacent_output_from_cursor(seat, output, edge)) {
|
||||
delay = rc.snap_preview_delay_inner;
|
||||
delay = rc.snap_overlay_delay_inner;
|
||||
} else {
|
||||
delay = rc.snap_preview_delay_outer;
|
||||
delay = rc.snap_overlay_delay_outer;
|
||||
}
|
||||
|
||||
if (delay > 0) {
|
||||
|
|
|
|||
72
src/theme.c
72
src/theme.c
|
|
@ -538,21 +538,21 @@ theme_builtin(struct theme *theme)
|
|||
theme->osd_border_color[0] = FLT_MIN;
|
||||
theme->osd_label_text_color[0] = FLT_MIN;
|
||||
|
||||
theme->snapping_preview_region_fill = true;
|
||||
theme->snapping_preview_edge_fill = true;
|
||||
theme->snapping_overlay_region_fill = true;
|
||||
theme->snapping_overlay_edge_fill = true;
|
||||
|
||||
parse_hexstr("#8080b380", theme->snapping_preview_region_bg_color);
|
||||
parse_hexstr("#8080b380", theme->snapping_preview_edge_bg_color);
|
||||
parse_hexstr("#8080b380", theme->snapping_overlay_region_bg_color);
|
||||
parse_hexstr("#8080b380", theme->snapping_overlay_edge_bg_color);
|
||||
|
||||
/* inherit settings in post_processing() if not set elsewhere */
|
||||
theme->snapping_preview_region_border_width = INT_MIN;
|
||||
theme->snapping_preview_edge_border_width = INT_MIN;
|
||||
memset(theme->snapping_preview_region_border_color, 0,
|
||||
sizeof(theme->snapping_preview_region_border_color));
|
||||
theme->snapping_preview_region_border_color[0][0] = FLT_MIN;
|
||||
memset(theme->snapping_preview_edge_border_color, 0,
|
||||
sizeof(theme->snapping_preview_edge_border_color));
|
||||
theme->snapping_preview_edge_border_color[0][0] = FLT_MIN;
|
||||
theme->snapping_overlay_region_border_width = INT_MIN;
|
||||
theme->snapping_overlay_edge_border_width = INT_MIN;
|
||||
memset(theme->snapping_overlay_region_border_color, 0,
|
||||
sizeof(theme->snapping_overlay_region_border_color));
|
||||
theme->snapping_overlay_region_border_color[0][0] = FLT_MIN;
|
||||
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;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -754,29 +754,29 @@ entry(struct theme *theme, const char *key, const char *value)
|
|||
if (match_glob(key, "osd.label.text.color")) {
|
||||
parse_hexstr(value, theme->osd_label_text_color);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.region.fill")) {
|
||||
theme->snapping_preview_region_fill = parse_bool(value, true);
|
||||
if (match_glob(key, "snapping.overlay.region.fill")) {
|
||||
theme->snapping_overlay_region_fill = parse_bool(value, true);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.edge.fill")) {
|
||||
theme->snapping_preview_edge_fill = parse_bool(value, true);
|
||||
if (match_glob(key, "snapping.overlay.edge.fill")) {
|
||||
theme->snapping_overlay_edge_fill = parse_bool(value, true);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.region.bg.color")) {
|
||||
parse_hexstr(value, theme->snapping_preview_region_bg_color);
|
||||
if (match_glob(key, "snapping.overlay.region.bg.color")) {
|
||||
parse_hexstr(value, theme->snapping_overlay_region_bg_color);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.edge.bg.color")) {
|
||||
parse_hexstr(value, theme->snapping_preview_edge_bg_color);
|
||||
if (match_glob(key, "snapping.overlay.edge.bg.color")) {
|
||||
parse_hexstr(value, theme->snapping_overlay_edge_bg_color);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.region.border.width")) {
|
||||
theme->snapping_preview_region_border_width = atoi(value);
|
||||
if (match_glob(key, "snapping.overlay.region.border.width")) {
|
||||
theme->snapping_overlay_region_border_width = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.edge.border.width")) {
|
||||
theme->snapping_preview_edge_border_width = atoi(value);
|
||||
if (match_glob(key, "snapping.overlay.edge.border.width")) {
|
||||
theme->snapping_overlay_edge_border_width = atoi(value);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.region.border.color")) {
|
||||
parse_hexstrs(value, theme->snapping_preview_region_border_color);
|
||||
if (match_glob(key, "snapping.overlay.region.border.color")) {
|
||||
parse_hexstrs(value, theme->snapping_overlay_region_border_color);
|
||||
}
|
||||
if (match_glob(key, "snapping.preview.edge.border.color")) {
|
||||
parse_hexstrs(value, theme->snapping_preview_edge_border_color);
|
||||
if (match_glob(key, "snapping.overlay.edge.border.color")) {
|
||||
parse_hexstrs(value, theme->snapping_overlay_edge_border_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1113,21 +1113,21 @@ post_processing(struct theme *theme)
|
|||
theme->osd_window_switcher_preview_border_color);
|
||||
}
|
||||
|
||||
if (theme->snapping_preview_region_border_width == INT_MIN) {
|
||||
theme->snapping_preview_region_border_width =
|
||||
if (theme->snapping_overlay_region_border_width == INT_MIN) {
|
||||
theme->snapping_overlay_region_border_width =
|
||||
theme->osd_border_width;
|
||||
}
|
||||
if (theme->snapping_preview_edge_border_width == INT_MIN) {
|
||||
theme->snapping_preview_edge_border_width =
|
||||
if (theme->snapping_overlay_edge_border_width == INT_MIN) {
|
||||
theme->snapping_overlay_edge_border_width =
|
||||
theme->osd_border_width;
|
||||
}
|
||||
if (theme->snapping_preview_region_border_color[0][0] == FLT_MIN) {
|
||||
if (theme->snapping_overlay_region_border_color[0][0] == FLT_MIN) {
|
||||
fill_colors_with_osd_theme(theme,
|
||||
theme->snapping_preview_region_border_color);
|
||||
theme->snapping_overlay_region_border_color);
|
||||
}
|
||||
if (theme->snapping_preview_edge_border_color[0][0] == FLT_MIN) {
|
||||
if (theme->snapping_overlay_edge_border_color[0][0] == FLT_MIN) {
|
||||
fill_colors_with_osd_theme(theme,
|
||||
theme->snapping_preview_edge_border_color);
|
||||
theme->snapping_overlay_edge_border_color);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue