Commit 936e5522 authored by Eisha Chen-yen-su's avatar Eisha Chen-yen-su

MediaViewer: Modify a button to leave full screen

This modifies the full screen button so that it enables the user to
leave the full screen mode when already in full screen.

parent ad61ec17
......@@ -39,11 +39,21 @@ impl App {
let op = self.op.clone();
let ui = self.ui.clone();
let full_screen_button = self.ui.builder
.expect("Cant find full_screen_button in ui file.");
full_screen_button.connect_clicked(move |_| {
let main_window = ui.builder
.expect("Cant find main_window in ui file.");
if let Some(win) = main_window.get_window() {
if !win.get_state().contains(gdk::WindowState::FULLSCREEN) {
} else {
let op = self.op.clone();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment