fix popup positions
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
This commit is contained in:
parent
bcc99b00ba
commit
647b86fd7d
3 changed files with 10 additions and 4 deletions
|
|
@ -158,6 +158,7 @@ struct _MwWidget {
|
|||
long last_tick;
|
||||
|
||||
MwBool is_menu;
|
||||
MwBool is_submenu;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -549,9 +549,13 @@ static void setup_popup(MwLL r, int x, int y, MwLL parent) {
|
|||
}
|
||||
|
||||
if(!topmost_parent->wayland.has_decorations && topmost_parent->wayland.do_csd) {
|
||||
if(p->is_menu) {
|
||||
r->wayland.x += round((float)CSD_BORDER_FRAME_LEFT / 2.);
|
||||
r->wayland.y += ceil((float)CSD_BORDER_FRAME_TOP / 2.);
|
||||
if(p->is_submenu) {
|
||||
} else if(p->is_menu) {
|
||||
r->wayland.x += ((float)CSD_BORDER_FRAME_LEFT / 2.);
|
||||
r->wayland.y += ((float)CSD_BORDER_FRAME_TOP / 2.);
|
||||
} else {
|
||||
r->wayland.x += ((float)CSD_BORDER_FRAME_LEFT);
|
||||
r->wayland.y += ((float)CSD_BORDER_FRAME_TOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ static int wcreate(MwWidget handle) {
|
|||
MwSetDefault(handle);
|
||||
MwSetInteger(handle, MwNleftPadding, 0);
|
||||
|
||||
handle->internal = NULL;
|
||||
handle->internal = NULL;
|
||||
handle->is_submenu = MwTRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue