mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-21 23:48:34 +02:00
ui: content draw on sync at connections, wallet list colors, translations
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ impl Colors {
|
||||
pub const GREEN: Color32 = Color32::from_rgb(0, 0x64, 0);
|
||||
pub const RED: Color32 = Color32::from_rgb(0x8B, 0, 0);
|
||||
pub const FILL: Color32 = Color32::from_gray(244);
|
||||
pub const FILL_DARK: Color32 = Color32::from_gray(234);
|
||||
pub const FILL_DARK: Color32 = Color32::from_gray(238);
|
||||
pub const CHECKBOX: Color32 = Color32::from_gray(100);
|
||||
pub const TEXT: Color32 = Color32::from_gray(80);
|
||||
pub const TEXT_BUTTON: Color32 = Color32::from_gray(70);
|
||||
|
||||
@@ -140,8 +140,8 @@ impl NetworkContent {
|
||||
});
|
||||
});
|
||||
|
||||
// Redraw after delay if node is not syncing to update stats.
|
||||
if Node::not_syncing() {
|
||||
// Redraw after delay if node is syncing to update stats.
|
||||
if Node::is_running() {
|
||||
ui.ctx().request_repaint_after(Node::STATS_UPDATE_DELAY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,14 +377,17 @@ impl WalletsContent {
|
||||
let config = wallet.get_config();
|
||||
let id = config.id;
|
||||
let is_selected = self.wallets.selected_id == Some(id);
|
||||
let is_current = wallet.is_open() && is_selected;
|
||||
|
||||
let current = is_selected && wallet.is_open();
|
||||
// Draw round background.
|
||||
let mut rect = ui.available_rect_before_wrap();
|
||||
rect.set_height(78.0);
|
||||
let rounding = View::item_rounding(0, 1, false);
|
||||
let bg_color = if is_current { Colors::ITEM_CURRENT } else { Colors::FILL };
|
||||
ui.painter().rect(rect, rounding, bg_color, View::HOVER_STROKE);
|
||||
let bg = if current {
|
||||
egui::Color32::from_gray(234)
|
||||
} else {
|
||||
Colors::FILL
|
||||
};
|
||||
ui.painter().rect(rect, rounding, bg, View::HOVER_STROKE);
|
||||
|
||||
ui.allocate_ui_with_layout(rect.size(), Layout::right_to_left(Align::Center), |ui| {
|
||||
// Setup padding for item buttons.
|
||||
|
||||
Reference in New Issue
Block a user