Add menu to header bar

This commit is contained in:
daa84 2017-11-13 12:01:37 +03:00
parent 05d6507dc5
commit 54fd5775e9

View File

@ -95,10 +95,6 @@ impl Ui {
} }
self.initialized = true; self.initialized = true;
if app.prefers_app_menu() {
self.create_main_menu(app);
}
let mut settings = self.settings.borrow_mut(); let mut settings = self.settings.borrow_mut();
settings.init(); settings.init();
@ -114,6 +110,10 @@ impl Ui {
.map(|opt| opt.trim() != "1") .map(|opt| opt.trim() != "1")
.unwrap_or(true); .unwrap_or(true);
if app.prefers_app_menu() || use_header_bar {
self.create_main_menu(app);
}
if use_header_bar { if use_header_bar {
let header_bar = HeaderBar::new(); let header_bar = HeaderBar::new();