Project

General

Profile

Bug #2167

WDialog z-index ordering [3.3.1rc1]

Added by Roman Puls almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/30/2013
Due date:
% Done:

0%

Estimated time:

Description

When creating WDialogs, the latest created dialog instance will overlap all other dialogs, and there's no way in bringing a dialog from the back to the front.

The Rocket-Launch example from the widget gallery shows this issue (create two or more dialogs).

My brute-force attempt to solve this via javascript/jQuery did not work (yet), but this is probably the rough direction to go?

WDialog *dlg = new WDialog("Dialog Example", content());
dlg->titleBar()->clicked().connect(std::bind([=](const WMouseEvent &mouseEvent) {
    const std::string id = dlg->id();

    std::cout << format("dialog %s has been clicked", id) << std::endl;
    std::string query = format("$('#%s').parent().append($('#%s'));", id, id);
    dlg->doJavaScript(query);
}, std::placeholders::_1));

Also, windows should probably come to the front not only by clicking the dialog-toolbar, but also when clicking any area of the dialog.

If I can help out, please let me know.

Thx,

Roman

PS: Example html attached which shows how to pop a div to the front.

PPS: I am using tinyformat for format-like operations


Files

divtest.html (916 Bytes) divtest.html bring-to-front example with div's Roman Puls, 08/30/2013 09:34 AM
jquery.js (267 KB) jquery.js jQuery.js needed for the example Roman Puls, 08/30/2013 09:34 AM

Also available in: Atom PDF