mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-20 18:04:18 +01:00
chrome: collapsible side panel
This implements the initial logic that makes the side panel collapsible. Since we don't have a proper hamburger control, we do the same thing we do on iOS for now.
This commit is contained in:
@@ -269,6 +269,11 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
let pfp_resp = ui.put(rect, &mut pfp);
|
||||
|
||||
action = action.or(pfp.action);
|
||||
|
||||
if resp.hovered() || resp.clicked() {
|
||||
crate::show_pointer(ui);
|
||||
}
|
||||
|
||||
pfp_resp.on_hover_ui_at_pointer(|ui| {
|
||||
ui.set_max_width(300.0);
|
||||
ui.add(ProfilePreview::new(
|
||||
@@ -277,10 +282,6 @@ impl<'a, 'd> NoteView<'a, 'd> {
|
||||
));
|
||||
});
|
||||
|
||||
if resp.hovered() || resp.clicked() {
|
||||
crate::show_pointer(ui);
|
||||
}
|
||||
|
||||
resp
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user