mirror of
https://github.com/damus-io/notedeck.git
synced 2024-10-18 11:13:23 +00:00
remove thread button
now that we have note hitboxes Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
e16eeb4d1b
commit
a8731c0210
@ -552,12 +552,9 @@ fn render_note_actionbar(
|
||||
) -> egui::InnerResponse<Option<BarAction>> {
|
||||
ui.horizontal(|ui| {
|
||||
let reply_resp = reply_button(ui, note_key);
|
||||
let thread_resp = thread_button(ui, note_key);
|
||||
|
||||
if reply_resp.clicked() {
|
||||
Some(BarAction::Reply(NoteId::new(*note_id)))
|
||||
} else if thread_resp.clicked() {
|
||||
Some(BarAction::OpenThread(NoteId::new(*note_id)))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@ -610,29 +607,6 @@ fn reply_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response {
|
||||
resp.union(put_resp)
|
||||
}
|
||||
|
||||
fn thread_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response {
|
||||
let id = ui.id().with(("thread_anim", note_key));
|
||||
let size = 8.0;
|
||||
let expand_size = 5.0;
|
||||
let anim_speed = 0.05;
|
||||
|
||||
let (rect, size, resp) = ui::anim::hover_expand(ui, id, size, expand_size, anim_speed);
|
||||
|
||||
let color = if ui.style().visuals.dark_mode {
|
||||
egui::Color32::WHITE
|
||||
} else {
|
||||
egui::Color32::BLACK
|
||||
};
|
||||
|
||||
ui.painter_at(rect).circle_stroke(
|
||||
rect.center(),
|
||||
(size - 1.0) / 2.0,
|
||||
egui::Stroke::new(1.0, color),
|
||||
);
|
||||
|
||||
resp
|
||||
}
|
||||
|
||||
fn repost_icon() -> egui::Image<'static> {
|
||||
let img_data = egui::include_image!("../../../assets/icons/repost_icon_4x.png");
|
||||
egui::Image::new(img_data)
|
||||
|
Loading…
Reference in New Issue
Block a user