fix(ui): fixed doubled "go back" button in header bar

This commit is contained in:
Observer KRypt0n_ 2024-03-24 12:24:31 +02:00
parent 4d04b2b8ac
commit 1e33b48d11
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
4 changed files with 2 additions and 42 deletions

View file

@ -80,14 +80,6 @@ impl SimpleAsyncComponent for EnvironmentPage {
#[wrap(Some)]
set_title_widget = &adw::WindowTitle {
set_title: &tr!("environment")
},
pack_start = &gtk::Button {
set_icon_name: "go-previous-symbolic",
connect_clicked[sender] => move |_| {
sender.output(EnhancementsAppMsg::OpenMainPage).unwrap();
}
}
},

View file

@ -74,11 +74,7 @@ impl AsyncFactoryComponent for GameSession {
}
}
async fn init_model(
init: Self::Init,
_index: &DynamicIndex,
_sender: AsyncFactorySender<Self>,
) -> Self {
async fn init_model(init: Self::Init, _index: &DynamicIndex, _sender: AsyncFactorySender<Self>) -> Self {
init
}
}
@ -114,14 +110,6 @@ impl SimpleAsyncComponent for GamePage {
#[wrap(Some)]
set_title_widget = &adw::WindowTitle {
set_title: &tr!("game")
},
pack_start = &gtk::Button {
set_icon_name: "go-previous-symbolic",
connect_clicked[sender] => move |_| {
sender.output(EnhancementsAppMsg::OpenMainPage).unwrap();
}
}
},
@ -154,11 +142,7 @@ impl SimpleAsyncComponent for GamePage {
}
}
async fn init(
_init: Self::Init,
root: Self::Root,
sender: AsyncComponentSender<Self>,
) -> AsyncComponentParts<Self> {
async fn init(_init: Self::Init, root: Self::Root, sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
tracing::info!("Initializing game settings");
let mut model = Self {

View file

@ -107,14 +107,6 @@ impl SimpleAsyncComponent for SandboxPage {
#[wrap(Some)]
set_title_widget = &adw::WindowTitle {
set_title: &tr!("sandbox")
},
pack_start = &gtk::Button {
set_icon_name: "go-previous-symbolic",
connect_clicked[sender] => move |_| {
sender.output(EnhancementsAppMsg::OpenMainPage).unwrap();
}
}
},

View file

@ -58,14 +58,6 @@ impl SimpleAsyncComponent for ComponentsPage {
#[wrap(Some)]
set_title_widget = &adw::WindowTitle {
set_title: &tr!("components")
},
pack_start = &gtk::Button {
set_icon_name: "go-previous-symbolic",
connect_clicked[sender] => move |_| {
sender.output(GeneralAppMsg::OpenMainPage).unwrap();
}
}
},