From 2406757ec978d07ee1a9c5a7cda43c50c49263f9 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 10 Jun 2009 22:53:00 +0000 Subject: [PATCH] fix annoying bug with config dialog window layout. as spotted by manio, toggling between "Basic" and "Advanced" mode was making the window move (just open Theme dialog and toggle). Manio suggested a fix by keeping window center between both modes, but I think that given our top-left to bottom-right reading (LTR) we better keep the title bar (x,y) intact and avoid full rescan. This can be weird in small screens where the dialog will not be centered anymore and that will show easily, but on regular screens this should not be an issue. Also spotted that it was wrong when trying to avoid window overflow (using x instead of y). PS: I wonder why we destroy and create the window all over again! This is really annoying, title bar will show the focus animation and you get lost (need to rescan it again). SVN revision: 41004 --- src/bin/e_config_dialog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/e_config_dialog.c b/src/bin/e_config_dialog.c index 577dc6876..cc18623cc 100644 --- a/src/bin/e_config_dialog.c +++ b/src/bin/e_config_dialog.c @@ -271,14 +271,14 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type) e_dialog_show(cfd->dia); if (cfd->icon) e_dialog_border_icon_set(cfd->dia, cfd->icon); - x = pdia->win->border->x + ((pdia->win->w - cfd->dia->win->w) / 2); - y = pdia->win->border->y + ((pdia->win->h - cfd->dia->win->h) / 2); + x = pdia->win->x; + y = pdia->win->y; if (x < 0) x = 0; if (y < 0) y = 0; if ((x + cfd->dia->win->w) > (pdia->win->container->w)) x = pdia->win->container->w - cfd->dia->win->w; if ((y + cfd->dia->win->h) > (pdia->win->container->h)) - x = pdia->win->container->h - cfd->dia->win->h; + y = pdia->win->container->h - cfd->dia->win->h; e_win_move(cfd->dia->win, x, y); e_win_placed_set(cfd->dia->win, 1); }