aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;