mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
It's hip to (not) be square...
This commit is contained in:
parent
94f21ca61c
commit
e3d2224b55
4 changed files with 19 additions and 13 deletions
|
|
@ -589,17 +589,19 @@
|
||||||
<!--
|
<!--
|
||||||
Magnifier settings
|
Magnifier settings
|
||||||
|
|
||||||
'size' sets the width and height in pixels of the magnifier window.
|
'width' sets the width in pixels of the magnifier window.
|
||||||
'initScale' sets the initial magnification factor when first booted.
|
'height' sets the height in pixels of the magnifier window.
|
||||||
|
'initScale' sets the initial magnification factor at boot.
|
||||||
'borderColour' is an XML RGB string with a leading # which sets the
|
'borderColour' is an XML RGB string with a leading # which sets the
|
||||||
colour of the border for the magnifier window.
|
colour of the border of the magnifier window.
|
||||||
'borderWidth' sets the width in pixels of the border for the
|
'borderWidth' sets the width in pixels of the border of the
|
||||||
magnifier window.
|
magnifier window.
|
||||||
'useFilter' sets whether to use a bilinear filter on the magnified
|
'useFilter' sets whether to use a bilinear filter on the magnified
|
||||||
output or simply to take nearest pixel.
|
output or simply to take nearest pixel.
|
||||||
-->
|
-->
|
||||||
<magnifier>
|
<magnifier>
|
||||||
<size>400</size>
|
<width>400</width>
|
||||||
|
<height>400</height>
|
||||||
<initScale>2</initScale>
|
<initScale>2</initScale>
|
||||||
<borderColour>#ff0000</borderColour>
|
<borderColour>#ff0000</borderColour>
|
||||||
<borderWidth>1</borderWidth>
|
<borderWidth>1</borderWidth>
|
||||||
|
|
|
||||||
|
|
@ -146,7 +146,8 @@ struct rcxml {
|
||||||
|
|
||||||
/* magnifier */
|
/* magnifier */
|
||||||
int mag_scale;
|
int mag_scale;
|
||||||
int mag_size;
|
int mag_width;
|
||||||
|
int mag_height;
|
||||||
struct rgb_colour mag_border_col;
|
struct rgb_colour mag_border_col;
|
||||||
int mag_border_width;
|
int mag_border_width;
|
||||||
bool mag_filter;
|
bool mag_filter;
|
||||||
|
|
|
||||||
|
|
@ -74,10 +74,10 @@ magnify(struct output *output, struct wlr_buffer *output_buffer, struct wlr_box
|
||||||
ox *= output->wlr_output->scale;
|
ox *= output->wlr_output->scale;
|
||||||
oy *= output->wlr_output->scale;
|
oy *= output->wlr_output->scale;
|
||||||
|
|
||||||
int width = rc.mag_size + 1;
|
int width = rc.mag_width + 1;
|
||||||
int height = width;
|
int height = rc.mag_height + 1;
|
||||||
double x = ox - (rc.mag_size / 2.0);
|
double x = ox - (rc.mag_width / 2.0);
|
||||||
double y = oy - (rc.mag_size / 2.0);
|
double y = oy - (rc.mag_height / 2.0);
|
||||||
double cropped_width = width;
|
double cropped_width = width;
|
||||||
double cropped_height = height;
|
double cropped_height = height;
|
||||||
double dst_x = 0;
|
double dst_x = 0;
|
||||||
|
|
|
||||||
|
|
@ -1047,8 +1047,10 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
} else {
|
} else {
|
||||||
wlr_log(WLR_ERROR, "Missing 'button' argument for tablet button mapping");
|
wlr_log(WLR_ERROR, "Missing 'button' argument for tablet button mapping");
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(nodename, "size.magnifier")) {
|
} else if (!strcasecmp(nodename, "width.magnifier")) {
|
||||||
rc.mag_size = atoi(content);
|
rc.mag_width = atoi(content);
|
||||||
|
} else if (!strcasecmp(nodename, "height.magnifier")) {
|
||||||
|
rc.mag_height = atoi(content);
|
||||||
} else if (!strcasecmp(nodename, "initScale.magnifier")) {
|
} else if (!strcasecmp(nodename, "initScale.magnifier")) {
|
||||||
rc.mag_scale = atoi(content);
|
rc.mag_scale = atoi(content);
|
||||||
} else if (!strcasecmp(nodename, "borderColour.magnifier")) {
|
} else if (!strcasecmp(nodename, "borderColour.magnifier")) {
|
||||||
|
|
@ -1264,7 +1266,8 @@ rcxml_init(void)
|
||||||
rc.workspace_config.min_nr_workspaces = 1;
|
rc.workspace_config.min_nr_workspaces = 1;
|
||||||
|
|
||||||
rc.mag_scale = 2;
|
rc.mag_scale = 2;
|
||||||
rc.mag_size = 400;
|
rc.mag_width = 400;
|
||||||
|
rc.mag_height = 400;
|
||||||
rc.mag_border_col.r = 255;
|
rc.mag_border_col.r = 255;
|
||||||
rc.mag_border_col.g = 0;
|
rc.mag_border_col.g = 0;
|
||||||
rc.mag_border_col.b = 0;
|
rc.mag_border_col.b = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue