ui: style hashtag button
Closes: #504 Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
committed by
William Casarin
parent
42c0f02072
commit
42f9ec97a6
@@ -3,8 +3,8 @@ use serde::{Deserialize, Serialize};
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use egui::{
|
use egui::{
|
||||||
pos2, vec2, Align, Color32, FontId, Id, ImageSource, Margin, Pos2, Rect, RichText, Separator,
|
pos2, vec2, Align, Button, Color32, FontId, Id, ImageSource, Margin, Pos2, Rect, RichText,
|
||||||
Ui, Vec2,
|
Separator, Ui, Vec2,
|
||||||
};
|
};
|
||||||
use nostrdb::Ndb;
|
use nostrdb::Ndb;
|
||||||
use tracing::error;
|
use tracing::error;
|
||||||
@@ -417,7 +417,14 @@ pub fn hashtag_ui(
|
|||||||
.margin(Margin::same(12.0));
|
.margin(Margin::same(12.0));
|
||||||
ui.add(text_edit);
|
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);
|
let resp = AddColumnOption::Hashtag(text_buffer.to_owned()).take_as_response(ndb, None);
|
||||||
id_string_map.remove(&id);
|
id_string_map.remove(&id);
|
||||||
resp
|
resp
|
||||||
|
|||||||
Reference in New Issue
Block a user