aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-27 16:39:11 +0200
committerdec05eba <dec05eba@protonmail.com>2018-10-27 16:40:19 +0200
commit0aabe419f68f18ac51ed162bc06f3079cd464fa3 (patch)
treef9ebd17ce22ccf12efef1adf89aa1e355bd9aea3 /src/Window.cpp
parent0293ec09e3485beb37490eb8a78297befbf9e1a2 (diff)
Draw nodes behind login box
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 208c616..b1efc20 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -14,19 +14,18 @@ namespace dchat
Window::Window()
{
set_border_width(0);
- Gtk::Overlay *overlay = Gtk::manage(new Gtk::Overlay());
WindowNotification *windowNotification = Gtk::manage(new WindowNotification());
- overlay->add_overlay(*windowNotification);
- overlay->set_overlay_pass_through(*windowNotification);
- overlay->add(stack);
- add(*overlay);
+ overlay.add_overlay(*windowNotification);
+ overlay.set_overlay_pass_through(*windowNotification);
+ overlay.add(stack);
+ add(overlay);
stack.set_transition_type(Gtk::StackTransitionType::STACK_TRANSITION_TYPE_SLIDE_LEFT_RIGHT);
stack.set_transition_duration(250);
stack.add(loginWindow, "login");
stack.add(chatWindow, "chat");
- overlay->show();
+ overlay.show();
windowNotification->show_all();
stack.show();
chatWindow.show_all();
@@ -181,6 +180,7 @@ namespace dchat
}
prevTimeMillis = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count() - 5000;
drawBackgroundConnection = signal_draw().connect(sigc::mem_fun(*this, &Window::drawBackground));
+ set_size_request(640, 480);
}
Window::~Window()
@@ -263,6 +263,7 @@ namespace dchat
}
}
cairo->stroke();
+ overlay.draw(cairo);
queue_draw();
return true;