ui: window resize, update egui (waiting for window dragging/resizing patch), pull to refresh widget, colors optimization, min window size, root panels switch optimization

This commit is contained in:
ardocrat
2024-06-27 12:30:27 +03:00
parent 735e9ad94d
commit 2469d3f021
18 changed files with 755 additions and 389 deletions
+11 -4
View File
@@ -14,6 +14,7 @@
use grin_core::global::ChainTypes;
use serde_derive::{Deserialize, Serialize};
use crate::gui::views::Root;
use crate::node::{NodeConfig, PeersConfig};
use crate::Settings;
@@ -69,10 +70,16 @@ impl Default for AppConfig {
}
impl AppConfig {
/// Default window width.
pub const DEFAULT_WIDTH: f32 = 1269.0;
/// Default window height.
pub const DEFAULT_HEIGHT: f32 = 789.0;
/// Desktop window frame margin sum, horizontal or vertical.
const FRAME_MARGIN: f32 = Root::WINDOW_FRAME_MARGIN * 2.0;
/// Default desktop window width.
pub const DEFAULT_WIDTH: f32 = Root::SIDE_PANEL_WIDTH * 3.0 + Self::FRAME_MARGIN;
/// Default desktop window height.
pub const DEFAULT_HEIGHT: f32 = 698.0 + Root::WINDOW_TITLE_HEIGHT + Self::FRAME_MARGIN;
/// Minimal desktop window width.
pub const MIN_WIDTH: f32 = Root::SIDE_PANEL_WIDTH + Self::FRAME_MARGIN;
/// Minimal desktop window height.
pub const MIN_HEIGHT: f32 = 630.0 + Root::WINDOW_TITLE_HEIGHT + Self::FRAME_MARGIN;
/// Application configuration file name.
pub const FILE_NAME: &'static str = "app.toml";