fix: paket: adjust viewswitcher in title
This commit is contained in:
parent
87befa2f13
commit
b9fb7fcea4
1 changed files with 12 additions and 13 deletions
|
@ -63,11 +63,14 @@ impl Component for Ready {
|
|||
#[wrap(Some)]
|
||||
set_child = &adw::NavigationView {
|
||||
add = &adw::NavigationPage {
|
||||
set_title: "",
|
||||
|
||||
#[wrap(Some)]
|
||||
set_child = &adw::ToolbarView {
|
||||
add_top_bar = ready_headerbar = &adw::HeaderBar {
|
||||
#[wrap(Some)]
|
||||
set_title_widget = ready_switchertop = &adw::ViewSwitcher{
|
||||
set_policy: adw::ViewSwitcherPolicy::Wide,
|
||||
set_stack: Some(&ready_view_stack),
|
||||
}
|
||||
},
|
||||
|
@ -161,30 +164,26 @@ impl Component for Ready {
|
|||
});
|
||||
}
|
||||
|
||||
let breakpoint_0 = adw::Breakpoint::new(adw::BreakpointCondition::new_length(
|
||||
let breakpoint = adw::Breakpoint::new(adw::BreakpointCondition::new_length(
|
||||
adw::BreakpointConditionLengthType::MaxWidth,
|
||||
480.0,
|
||||
adw::LengthUnit::Sp,
|
||||
));
|
||||
let breakpoint_1 = adw::Breakpoint::new(adw::BreakpointCondition::new_length(
|
||||
adw::BreakpointConditionLengthType::MaxWidth,
|
||||
480.0,
|
||||
450.0,
|
||||
adw::LengthUnit::Sp,
|
||||
));
|
||||
|
||||
let widgets = view_output!();
|
||||
|
||||
breakpoint_0.add_setter(widgets.ready_headerbar.widget_ref(), "title-widget", None);
|
||||
sender
|
||||
.output(ReadyOutput::AddBreakpoint(breakpoint_0))
|
||||
.unwrap();
|
||||
breakpoint_1.add_setter(
|
||||
breakpoint.add_setter(
|
||||
widgets.ready_headerbar.widget_ref(),
|
||||
"show-title",
|
||||
Some(>k::glib::Value::from(false)),
|
||||
);
|
||||
breakpoint.add_setter(
|
||||
widgets.ready_switcherbar.widget_ref(),
|
||||
"reveal",
|
||||
Some(>k::glib::Value::from(true)),
|
||||
);
|
||||
sender
|
||||
.output(ReadyOutput::AddBreakpoint(breakpoint_1))
|
||||
.output(ReadyOutput::AddBreakpoint(breakpoint))
|
||||
.unwrap();
|
||||
|
||||
ComponentParts { model, widgets }
|
||||
|
|
Loading…
Reference in a new issue