fix: rotate the advanced section chevron when it opens (#885)

This commit is contained in:
LynithDev 2026-09-28 20:53:41 +02:00 • committed by GitHub
parent 7f1a3176cf
commit 48a25f0c2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 14 deletions

View file

@ -78,7 +78,7 @@ pub(crate) use microsoft_login::login_dialog;
pub use microsoft_login::use_microsoft_login;
pub(crate) use navbar::window_controls;
pub use navbar::{AppNavbar, OnboardingNavbar};
pub use notifications::NotificationCenter;
pub use notifications::{ChevronToggle, NotificationCenter};
pub use optional_mods_popup::OptionalModsPopup;
pub use overlay_popup::{OVERLAY_BASE_LEVEL, OVERLAY_MAX_LEVEL, OverlayPopup, overlay_is_topmost};
pub use package_delete_dialog::use_shared_delete;

View file

@ -285,8 +285,8 @@ fn task_row(task: &crate::notifications::TaskView) -> impl IntoElement {
}
#[derive(PartialEq)]
struct ChevronToggle {
expanded: bool,
pub struct ChevronToggle {
pub expanded: bool,
}
impl Component for ChevronToggle {

View file

@ -6,8 +6,8 @@ use oneclient_content::packages::ContentType;
use oneclient_core::settings::ViewLayout;
use crate::components::{
Button, CardLayout, Icon, IconType, LazySection, PackageEntry, PackageRow, ScrollArea, Segment,
SegmentedControl, TextInput, package_context_menu, use_shared_delete,
Button, CardLayout, ChevronToggle, Icon, IconType, LazySection, PackageEntry, PackageRow,
ScrollArea, Segment, SegmentedControl, TextInput, package_context_menu, use_shared_delete,
};
use crate::hooks::{ClusterAction, use_cluster_mutation, use_dispatch, use_overlay_claim};
use crate::routes::Route;
@ -743,15 +743,7 @@ impl Component for SectionHeader {
.on_pointer_leave(move |_| hovered.set(false))
.on_press(move |_| open.toggle())
})
.child(
Icon::new(if expanded {
IconType::ChevronDown
} else {
IconType::ChevronRight
})
.size(14.)
.color(colors::fg_secondary()),
)
.child(ChevronToggle { expanded })
.child(
label()
.text(self.label)