notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 42f9ec97a6fbb13a53e00a736a3f2109c752adf9
parent 42c0f020728c62ba401cedb9a5561ffb62a61222
Author: kernelkind <kernelkind@gmail.com>
Date:   Fri, 29 Nov 2024 13:32:58 -0500

ui: style hashtag button

Closes: #504
Signed-off-by: kernelkind <kernelkind@gmail.com>

Diffstat:
Msrc/ui/add_column.rs | 13++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/ui/add_column.rs b/src/ui/add_column.rs @@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize}; use std::collections::HashMap; use egui::{ - pos2, vec2, Align, Color32, FontId, Id, ImageSource, Margin, Pos2, Rect, RichText, Separator, - Ui, Vec2, + pos2, vec2, Align, Button, Color32, FontId, Id, ImageSource, Margin, Pos2, Rect, RichText, + Separator, Ui, Vec2, }; use nostrdb::Ndb; use tracing::error; @@ -417,7 +417,14 @@ pub fn hashtag_ui( .margin(Margin::same(12.0)); ui.add(text_edit); - if ui.button("Add").clicked() { + ui.add_space(8.0); + if ui + .add_sized( + egui::vec2(50.0, 40.0), + Button::new("Add").rounding(8.0).fill(crate::colors::PINK), + ) + .clicked() + { let resp = AddColumnOption::Hashtag(text_buffer.to_owned()).take_as_response(ndb, None); id_string_map.remove(&id); resp