# HG changeset patch # User Torsten # Date 1419950337 -3600 # Node ID 521d4959fc42e5b94a9c672ac8099c8d90e7b12b # Parent 9c719c504e8d03bf3b14185a4ffd8e7529addd7a fix positioning issues of editor find dialog (bug #43174) * file-editor.cc (find, change_editor_state): correct the recovered position by 10 px in each direction * find-dialog.cc (ctor): put the find dialog in the lower left corner of editor diff -r 9c719c504e8d -r 521d4959fc42 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Tue Dec 30 08:24:14 2014 +0100 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Dec 30 15:38:57 2014 +0100 @@ -1024,14 +1024,15 @@ _find_dialog->setWindowModality (Qt::NonModal); _find_dialog_geometry = _find_dialog->geometry (); } - - if (!_find_dialog->isVisible ()) + else if (!_find_dialog->isVisible ()) { _find_dialog->setGeometry (_find_dialog_geometry); - _find_dialog->show (); - _find_dialog_is_visible = true; + QPoint p = _find_dialog->pos (); + _find_dialog->move(p.x ()+10, p.y ()+10); } + _find_dialog->show (); + _find_dialog_is_visible = true; _find_dialog->activateWindow (); _find_dialog->init_search_text (); @@ -1961,6 +1962,8 @@ if (_find_dialog && _find_dialog_is_visible) { _find_dialog->setGeometry (_find_dialog_geometry); + QPoint p = _find_dialog->pos (); + _find_dialog->move(p.x ()+10, p.y ()+10); _find_dialog->show (); } diff -r 9c719c504e8d -r 521d4959fc42 libgui/src/m-editor/find-dialog.cc --- a/libgui/src/m-editor/find-dialog.cc Tue Dec 30 08:24:14 2014 +0100 +++ b/libgui/src/m-editor/find-dialog.cc Tue Dec 30 15:38:57 2014 +0100 @@ -175,14 +175,11 @@ _rep_active = false; // move dialog to side of the parent if there is room on the desktop to do so. - QWidget * desktop = QApplication::desktop (); - int xp = p->x () + p->frameGeometry ().width (); - int yp= p->y (); - if (desktop != 0 && sizeHint ().isValid ()) - { - if (xp + sizeHint ().width () > desktop->width ()) - xp = desktop->width () - sizeHint ().width (); - } + int xp = p->x () +20; + int yp = p->y () + p->frameGeometry ().height () - sizeHint ().height () -20; + + if (yp < 0) + yp = 0; move (xp, yp);