remove thread button
now that we have note hitboxes Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -552,12 +552,9 @@ fn render_note_actionbar(
|
|||||||
) -> egui::InnerResponse<Option<BarAction>> {
|
) -> egui::InnerResponse<Option<BarAction>> {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
let reply_resp = reply_button(ui, note_key);
|
let reply_resp = reply_button(ui, note_key);
|
||||||
let thread_resp = thread_button(ui, note_key);
|
|
||||||
|
|
||||||
if reply_resp.clicked() {
|
if reply_resp.clicked() {
|
||||||
Some(BarAction::Reply(NoteId::new(*note_id)))
|
Some(BarAction::Reply(NoteId::new(*note_id)))
|
||||||
} else if thread_resp.clicked() {
|
|
||||||
Some(BarAction::OpenThread(NoteId::new(*note_id)))
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
@@ -610,29 +607,6 @@ fn reply_button(ui: &mut egui::Ui, note_key: NoteKey) -> egui::Response {
|
|||||||
resp.union(put_resp)
|
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> {
|
fn repost_icon() -> egui::Image<'static> {
|
||||||
let img_data = egui::include_image!("../../../assets/icons/repost_icon_4x.png");
|
let img_data = egui::include_image!("../../../assets/icons/repost_icon_4x.png");
|
||||||
egui::Image::new(img_data)
|
egui::Image::new(img_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user