mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-24 03:24:21 +01:00
ui/note: make buttons larger
Changelog-Changed: Make buttons larger Fixes: https://github.com/damus-io/notedeck/issues/879 Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -20,8 +20,13 @@ pub fn hover_expand(
|
|||||||
(rect, size, response)
|
(rect, size, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn hover_small_size() -> f32 {
|
||||||
|
14.0
|
||||||
|
}
|
||||||
|
|
||||||
pub fn hover_expand_small(ui: &mut egui::Ui, id: egui::Id) -> (egui::Rect, f32, egui::Response) {
|
pub fn hover_expand_small(ui: &mut egui::Ui, id: egui::Id) -> (egui::Rect, f32, egui::Response) {
|
||||||
let size = 10.0;
|
let size = hover_small_size();
|
||||||
let expand_size = 5.0;
|
let expand_size = 5.0;
|
||||||
let anim_speed = 0.05;
|
let anim_speed = 0.05;
|
||||||
|
|
||||||
|
|||||||
@@ -782,8 +782,12 @@ fn render_note_actionbar(
|
|||||||
i18n: &mut Localization,
|
i18n: &mut Localization,
|
||||||
) -> egui::InnerResponse<Option<NoteAction>> {
|
) -> egui::InnerResponse<Option<NoteAction>> {
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
|
ui.set_min_height(26.0);
|
||||||
|
ui.spacing_mut().item_spacing.x = 24.0;
|
||||||
|
|
||||||
let reply_resp =
|
let reply_resp =
|
||||||
reply_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand);
|
reply_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand);
|
||||||
|
|
||||||
let quote_resp =
|
let quote_resp =
|
||||||
quote_repost_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand);
|
quote_repost_button(ui, i18n, note_key).on_hover_cursor(egui::CursorIcon::PointingHand);
|
||||||
|
|
||||||
@@ -899,7 +903,7 @@ fn quote_repost_button(
|
|||||||
i18n: &mut Localization,
|
i18n: &mut Localization,
|
||||||
note_key: NoteKey,
|
note_key: NoteKey,
|
||||||
) -> egui::Response {
|
) -> egui::Response {
|
||||||
let size = 14.0;
|
let size = crate::anim::hover_small_size() + 4.0;
|
||||||
let expand_size = 5.0;
|
let expand_size = 5.0;
|
||||||
let anim_speed = 0.05;
|
let anim_speed = 0.05;
|
||||||
let id = ui.id().with(("repost_anim", note_key));
|
let id = ui.id().with(("repost_anim", note_key));
|
||||||
|
|||||||
Reference in New Issue
Block a user