ui: fix wallet balance content margin, fix panels stroke, update translations
This commit is contained in:
parent
fc48e60608
commit
9eebe0c791
6 changed files with 16 additions and 11 deletions
|
@ -2,7 +2,7 @@ copy: Copy
|
||||||
paste: Paste
|
paste: Paste
|
||||||
continue: Continue
|
continue: Continue
|
||||||
complete: Complete
|
complete: Complete
|
||||||
loading_error: Loading error
|
error: Error
|
||||||
retry: Retry
|
retry: Retry
|
||||||
close: Close
|
close: Close
|
||||||
change: Change
|
change: Change
|
||||||
|
|
|
@ -2,7 +2,7 @@ copy: Копировать
|
||||||
paste: Вставить
|
paste: Вставить
|
||||||
continue: Продолжить
|
continue: Продолжить
|
||||||
complete: Завершить
|
complete: Завершить
|
||||||
loading_error: Ошибка загрузки
|
error: Ошибка
|
||||||
retry: Повторить
|
retry: Повторить
|
||||||
close: Закрыть
|
close: Закрыть
|
||||||
change: Изменить
|
change: Изменить
|
||||||
|
|
|
@ -444,7 +444,7 @@ impl WalletsContent {
|
||||||
// Setup wallet status text.
|
// Setup wallet status text.
|
||||||
let status_text = if wallet.is_open() {
|
let status_text = if wallet.is_open() {
|
||||||
if wallet.sync_error() {
|
if wallet.sync_error() {
|
||||||
format!("{} {}", WARNING_CIRCLE, t!("loading_error"))
|
format!("{} {}", WARNING_CIRCLE, t!("error"))
|
||||||
} else if wallet.is_closing() {
|
} else if wallet.is_closing() {
|
||||||
format!("{} {}", SPINNER, t!("wallets.closing"))
|
format!("{} {}", SPINNER, t!("wallets.closing"))
|
||||||
} else if wallet.is_repairing() {
|
} else if wallet.is_repairing() {
|
||||||
|
|
|
@ -60,7 +60,13 @@ impl WalletContent {
|
||||||
left: View::far_left_inset_margin(ui) + 4.0,
|
left: View::far_left_inset_margin(ui) + 4.0,
|
||||||
right: View::get_right_inset() + 4.0,
|
right: View::get_right_inset() + 4.0,
|
||||||
top: 4.0,
|
top: 4.0,
|
||||||
bottom: View::get_bottom_inset() + 4.0,
|
bottom: 0.0,
|
||||||
|
},
|
||||||
|
outer_margin: Margin {
|
||||||
|
left: 0.0,
|
||||||
|
right: 0.0,
|
||||||
|
top: 0.0,
|
||||||
|
bottom: -1.0,
|
||||||
},
|
},
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
|
@ -117,9 +123,9 @@ impl WalletContent {
|
||||||
/// Draw wallet account balance.
|
/// Draw wallet account balance.
|
||||||
fn account_balance_ui(ui: &mut egui::Ui, data: &WalletData, account: &Option<String>) {
|
fn account_balance_ui(ui: &mut egui::Ui, data: &WalletData, account: &Option<String>) {
|
||||||
let mut rect = ui.available_rect_before_wrap();
|
let mut rect = ui.available_rect_before_wrap();
|
||||||
rect.set_height(76.0);
|
rect.set_height(75.0);
|
||||||
// Draw round background.
|
// Draw round background.
|
||||||
let rounding = View::item_rounding(0, 1, false);
|
let rounding = View::item_rounding(0, 2, false);
|
||||||
ui.painter().rect(rect, rounding, Colors::BUTTON, View::ITEM_STROKE);
|
ui.painter().rect(rect, rounding, Colors::BUTTON, View::ITEM_STROKE);
|
||||||
|
|
||||||
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
||||||
|
@ -131,7 +137,7 @@ impl WalletContent {
|
||||||
ui.style_mut().visuals.widgets.active.rounding = Rounding::same(8.0);
|
ui.style_mut().visuals.widgets.active.rounding = Rounding::same(8.0);
|
||||||
|
|
||||||
// Draw button to add new account.
|
// Draw button to add new account.
|
||||||
View::item_button(ui, View::item_rounding(0, 1, true), PLUS, None, || {
|
View::item_button(ui, View::item_rounding(0, 2, true), PLUS, None, || {
|
||||||
//TODO add account modal.
|
//TODO add account modal.
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -156,9 +162,8 @@ impl WalletContent {
|
||||||
Some(name) => name.to_owned()
|
Some(name) => name.to_owned()
|
||||||
};
|
};
|
||||||
let account_text = format!("{} {}", FILE_ARCHIVE, account_name);
|
let account_text = format!("{} {}", FILE_ARCHIVE, account_name);
|
||||||
ui.add_space(-1.0);
|
ui.add_space(-2.0);
|
||||||
View::ellipsize_text(ui, account_text, 15.0, Colors::TEXT);
|
View::ellipsize_text(ui, account_text, 15.0, Colors::TEXT);
|
||||||
ui.add_space(1.0);
|
|
||||||
|
|
||||||
// Show confirmed height.
|
// Show confirmed height.
|
||||||
let height_text = format!("{} {}", PACKAGE, data.info.last_confirmed_height);
|
let height_text = format!("{} {}", PACKAGE, data.info.last_confirmed_height);
|
||||||
|
|
|
@ -42,7 +42,7 @@ impl WalletTab for WalletReceive {
|
||||||
// Show receiving content panel.
|
// Show receiving content panel.
|
||||||
egui::CentralPanel::default()
|
egui::CentralPanel::default()
|
||||||
.frame(egui::Frame {
|
.frame(egui::Frame {
|
||||||
stroke: View::DEFAULT_STROKE,
|
stroke: View::ITEM_STROKE,
|
||||||
fill: Colors::WHITE,
|
fill: Colors::WHITE,
|
||||||
inner_margin: Margin {
|
inner_margin: Margin {
|
||||||
left: View::far_left_inset_margin(ui) + 4.0,
|
left: View::far_left_inset_margin(ui) + 4.0,
|
||||||
|
|
|
@ -41,7 +41,7 @@ impl WalletTab for WalletSend {
|
||||||
// Show sending content panel.
|
// Show sending content panel.
|
||||||
egui::CentralPanel::default()
|
egui::CentralPanel::default()
|
||||||
.frame(egui::Frame {
|
.frame(egui::Frame {
|
||||||
stroke: View::DEFAULT_STROKE,
|
stroke: View::ITEM_STROKE,
|
||||||
fill: Colors::WHITE,
|
fill: Colors::WHITE,
|
||||||
inner_margin: Margin {
|
inner_margin: Margin {
|
||||||
left: View::far_left_inset_margin(ui) + 4.0,
|
left: View::far_left_inset_margin(ui) + 4.0,
|
||||||
|
|
Loading…
Reference in a new issue