mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
view: Align large views to usable area
This commit is contained in:
parent
5062c5bea3
commit
612c296d52
1 changed files with 4 additions and 4 deletions
|
|
@ -260,11 +260,11 @@ view_compute_centered_position(struct view *view, struct output *output,
|
|||
*y = usable.y + (usable.height - height) / 2;
|
||||
|
||||
/* If view is bigger than usable area, just top/left align it */
|
||||
if (*x < 0) {
|
||||
*x = 0;
|
||||
if (*x < usable.x) {
|
||||
*x = usable.x;
|
||||
}
|
||||
if (*y < 0) {
|
||||
*y = 0;
|
||||
if (*y < usable.y) {
|
||||
*y = usable.y;
|
||||
}
|
||||
|
||||
#if HAVE_XWAYLAND
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue