ui: change icons, amount format

This commit is contained in:
ardocrat 2024-04-22 14:34:19 +03:00
parent 53f86edb34
commit 43b1105614
3 changed files with 10 additions and 10 deletions

View file

@ -19,7 +19,7 @@ use grin_core::core::amount_to_hr_string;
use crate::AppConfig;
use crate::gui::Colors;
use crate::gui::icons::{BRIDGE, CHECK, CHECK_FAT, ENVELOPE_OPEN, FILES, FOLDER_USER, GEAR_FINE, HASH, PACKAGE, POWER, QR_CODE, REPEAT, USERS_THREE};
use crate::gui::icons::{BRIDGE, CHAT_CIRCLE_TEXT, CHECK, CHECK_FAT, FOLDER_USER, GEAR_FINE, GRAPH, PACKAGE, PATH, POWER, QR_CODE, REPEAT, USERS_THREE};
use crate::gui::platform::PlatformCallbacks;
use crate::gui::views::{Modal, Root, View};
use crate::gui::views::types::{ModalPosition, TextEditOptions};
@ -351,13 +351,13 @@ impl WalletContent {
let current_type = self.current_tab.get_type();
ui.columns(4, |columns| {
columns[0].vertical_centered_justified(|ui| {
View::tab_button(ui, FILES, current_type == WalletTabType::Txs, || {
View::tab_button(ui, GRAPH, current_type == WalletTabType::Txs, || {
self.current_tab = Box::new(WalletInfo::default());
});
});
columns[1].vertical_centered_justified(|ui| {
let is_messages = current_type == WalletTabType::Messages;
View::tab_button(ui, ENVELOPE_OPEN, is_messages, || {
View::tab_button(ui, CHAT_CIRCLE_TEXT, is_messages, || {
self.current_tab = Box::new(
WalletMessages::new(wallet.can_use_dandelion())
);
@ -531,7 +531,7 @@ fn account_item_ui(ui: &mut egui::Ui,
ui.vertical(|ui| {
ui.add_space(4.0);
// Show spendable amount.
let amount = amount_to_hr_string(acc.spendable_amount, false);
let amount = amount_to_hr_string(acc.spendable_amount, true);
let amount_text = format!("{} {}", amount, GRIN);
ui.label(RichText::new(amount_text).size(18.0).color(Colors::BLACK));
ui.add_space(-2.0);
@ -547,7 +547,7 @@ fn account_item_ui(ui: &mut egui::Ui,
View::ellipsize_text(ui, acc_name, 15.0, Colors::TEXT);
// Show account BIP32 derivation path.
let acc_path = format!("{} {}", HASH, acc.path);
let acc_path = format!("{} {}", PATH, acc.path);
ui.label(RichText::new(acc_path).size(15.0).color(Colors::GRAY));
ui.add_space(3.0);
});

View file

@ -19,7 +19,7 @@ use grin_wallet_libwallet::{Slate, SlateState};
use log::error;
use crate::gui::Colors;
use crate::gui::icons::{BROOM, CLIPBOARD_TEXT, COPY, DOWNLOAD, PROHIBIT, UPLOAD};
use crate::gui::icons::{BROOM, CLIPBOARD_TEXT, COPY, DOWNLOAD_SIMPLE, PROHIBIT, UPLOAD_SIMPLE};
use crate::gui::platform::PlatformCallbacks;
use crate::gui::views::{Modal, Root, View};
use crate::gui::views::types::{ModalPosition, TextEditOptions};
@ -514,7 +514,7 @@ impl WalletMessages {
ui.columns(2, |columns| {
columns[0].vertical_centered_justified(|ui| {
// Draw send request creation button.
let send_text = format!("{} {}", UPLOAD, t!("wallets.send"));
let send_text = format!("{} {}", UPLOAD_SIMPLE, t!("wallets.send"));
View::button(ui, send_text, Colors::BUTTON, || {
// Setup modal values.
self.send_request = true;
@ -530,7 +530,7 @@ impl WalletMessages {
});
columns[1].vertical_centered_justified(|ui| {
// Draw invoice request creation button.
let receive_text = format!("{} {}", DOWNLOAD, t!("wallets.receive"));
let receive_text = format!("{} {}", DOWNLOAD_SIMPLE, t!("wallets.receive"));
View::button(ui, receive_text, Colors::BUTTON, || {
// Setup modal values.
self.send_request = false;

View file

@ -18,7 +18,7 @@ use grin_core::core::amount_to_hr_string;
use grin_wallet_libwallet::{Slate, SlateState, TxLogEntryType};
use crate::gui::Colors;
use crate::gui::icons::{ARROW_CIRCLE_DOWN, ARROW_CIRCLE_UP, ARROWS_CLOCKWISE, BRIDGE, CALENDAR_CHECK, CHAT_CIRCLE_TEXT, CHECK_CIRCLE, DOTS_THREE_CIRCLE, FILE_TEXT, GEAR_FINE, PROHIBIT, X_CIRCLE};
use crate::gui::icons::{ARROW_CIRCLE_DOWN, ARROW_CIRCLE_UP, ARROW_CLOCKWISE, ARROWS_CLOCKWISE, BRIDGE, CALENDAR_CHECK, CHAT_CIRCLE_TEXT, CHECK_CIRCLE, DOTS_THREE_CIRCLE, FILE_TEXT, GEAR_FINE, PROHIBIT, X_CIRCLE};
use crate::gui::platform::PlatformCallbacks;
use crate::gui::views::{Root, View};
use crate::gui::views::wallets::types::WalletTab;
@ -201,7 +201,7 @@ fn tx_item_ui(ui: &mut egui::Ui,
if can_repost {
View::item_button(ui,
Rounding::default(),
ARROWS_CLOCKWISE,
ARROW_CLOCKWISE,
Some(Colors::GREEN), || {
// Create slate to check existing file.
let mut slate = Slate::blank(1, false);