mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
VisualBuilder: Use real GWidgets instead of pretend VBWidgets.
That first design was the wrong idea. Instead, have VBWidget instantiate a GWidget of the appropriate type and parent it to the VBForm. We then use a new "greedy hit-testing" mechanism in GWidget to prevent any mouse events from reaching the VBForm's children. To paint the grabbers above the child widgets, I added a slightly hackish but kind of neat second_paint_event() that is called after a widget has painted all of his children. :^)
This commit is contained in:
parent
af070324db
commit
c6ffb3e2b8
12 changed files with 94 additions and 87 deletions
|
@ -46,7 +46,7 @@ int main(int argc, char** argv)
|
|||
app.set_menubar(move(menubar));
|
||||
|
||||
auto* window = new GWindow;
|
||||
window->set_title("Form1");
|
||||
window->set_title(form1->name());
|
||||
window->set_rect(20, 200, 640, 400);
|
||||
window->set_main_widget(form1);
|
||||
window->set_should_exit_event_loop_on_close(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue