mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
view: no gap for top/left align big window
On initial positioning of toplevel windows we call view_center(). During the centering process, if it turns out that the view is larger than the output usable-area then we just top/left align it with no gap. Relates to the gap aspect of issue #403 Reported-by: @Flrian
This commit is contained in:
parent
c4b85041ba
commit
d83c58919f
1 changed files with 4 additions and 4 deletions
|
|
@ -275,11 +275,11 @@ view_compute_centered_position(struct view *view, int w, int h, int *x, int *y)
|
||||||
*y = usable.y + (usable.height - height) / 2;
|
*y = usable.y + (usable.height - height) / 2;
|
||||||
|
|
||||||
/* If view is bigger than usable area, just top/left align it */
|
/* If view is bigger than usable area, just top/left align it */
|
||||||
if (*x < rc.gap) {
|
if (*x < 0) {
|
||||||
*x = rc.gap;
|
*x = 0;
|
||||||
}
|
}
|
||||||
if (*y < rc.gap) {
|
if (*y < 0) {
|
||||||
*y = rc.gap;
|
*y = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if HAVE_XWAYLAND
|
#if HAVE_XWAYLAND
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue