mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
squash! ssd: fix resizing on border corners and add <resize><cornerRange>
Default to half the titlebar height.
This commit is contained in:
parent
99af1edfe3
commit
b2a4ea0fb3
3 changed files with 8 additions and 3 deletions
|
|
@ -580,7 +580,8 @@ extending outward from the snapped edge.
|
||||||
The size of corner regions to which the 'TLCorner', 'TRCorner',
|
The size of corner regions to which the 'TLCorner', 'TRCorner',
|
||||||
'BLCorner' and 'RLCorner' mousebind contexts apply, as well as the size
|
'BLCorner' and 'RLCorner' mousebind contexts apply, as well as the size
|
||||||
of the border region for which mouse resizing will apply both
|
of the border region for which mouse resizing will apply both
|
||||||
horizontally and vertically rather than one or the other. Default is 8.
|
horizontally and vertically rather than one or the other. Default is
|
||||||
|
half the titlebar height.
|
||||||
|
|
||||||
## KEYBOARD
|
## KEYBOARD
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1221,7 +1221,7 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
} else if (!strcasecmp(nodename, "drawContents.resize")) {
|
} else if (!strcasecmp(nodename, "drawContents.resize")) {
|
||||||
set_bool(content, &rc.resize_draw_contents);
|
set_bool(content, &rc.resize_draw_contents);
|
||||||
} else if (!strcasecmp(nodename, "cornerRange.resize")) {
|
} else if (!strcasecmp(nodename, "cornerRange.resize")) {
|
||||||
rc.resize_corner_range = MAX(0, atoi(content));
|
rc.resize_corner_range = atoi(content);
|
||||||
} else if (!strcasecmp(nodename, "mouseEmulation.tablet")) {
|
} else if (!strcasecmp(nodename, "mouseEmulation.tablet")) {
|
||||||
set_bool(content, &rc.tablet.force_mouse_emulation);
|
set_bool(content, &rc.tablet.force_mouse_emulation);
|
||||||
} else if (!strcasecmp(nodename, "mapToOutput.tablet")) {
|
} else if (!strcasecmp(nodename, "mapToOutput.tablet")) {
|
||||||
|
|
@ -1494,7 +1494,7 @@ rcxml_init(void)
|
||||||
|
|
||||||
rc.resize_indicator = LAB_RESIZE_INDICATOR_NEVER;
|
rc.resize_indicator = LAB_RESIZE_INDICATOR_NEVER;
|
||||||
rc.resize_draw_contents = true;
|
rc.resize_draw_contents = true;
|
||||||
rc.resize_corner_range = 8;
|
rc.resize_corner_range = -1;
|
||||||
|
|
||||||
rc.workspace_config.popuptime = INT_MIN;
|
rc.workspace_config.popuptime = INT_MIN;
|
||||||
rc.workspace_config.min_nr_workspaces = 1;
|
rc.workspace_config.min_nr_workspaces = 1;
|
||||||
|
|
|
||||||
|
|
@ -1388,6 +1388,10 @@ post_processing(struct theme *theme)
|
||||||
rc.corner_radius = theme->titlebar_height - 1;
|
rc.corner_radius = theme->titlebar_height - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rc.resize_corner_range < 0) {
|
||||||
|
rc.resize_corner_range = theme->titlebar_height / 2;
|
||||||
|
}
|
||||||
|
|
||||||
int min_button_hover_radius =
|
int min_button_hover_radius =
|
||||||
MIN(theme->window_button_width, theme->window_button_height) / 2;
|
MIN(theme->window_button_width, theme->window_button_height) / 2;
|
||||||
if (theme->window_button_hover_bg_corner_radius > min_button_hover_radius) {
|
if (theme->window_button_hover_bg_corner_radius > min_button_hover_radius) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue