ui: root to content, macos related window fixes

This commit is contained in:
ardocrat
2024-07-02 23:52:25 +03:00
parent 84d71e371d
commit 03a3dc097a
20 changed files with 203 additions and 214 deletions
+5 -5
View File
@@ -14,7 +14,7 @@
use grin_core::global::ChainTypes;
use serde_derive::{Deserialize, Serialize};
use crate::gui::views::Root;
use crate::gui::views::Content;
use crate::node::{NodeConfig, PeersConfig};
use crate::Settings;
@@ -71,15 +71,15 @@ impl Default for AppConfig {
impl AppConfig {
/// Desktop window frame margin sum, horizontal or vertical.
const FRAME_MARGIN: f32 = Root::WINDOW_FRAME_MARGIN * 2.0;
const FRAME_MARGIN: f32 = Content::WINDOW_FRAME_MARGIN * 2.0;
/// Default desktop window width.
pub const DEFAULT_WIDTH: f32 = Root::SIDE_PANEL_WIDTH * 3.0 + Self::FRAME_MARGIN;
pub const DEFAULT_WIDTH: f32 = Content::SIDE_PANEL_WIDTH * 3.0 + Self::FRAME_MARGIN;
/// Default desktop window height.
pub const DEFAULT_HEIGHT: f32 = 706.0;
/// Minimal desktop window width.
pub const MIN_WIDTH: f32 = Root::SIDE_PANEL_WIDTH + Self::FRAME_MARGIN;
pub const MIN_WIDTH: f32 = Content::SIDE_PANEL_WIDTH + Self::FRAME_MARGIN;
/// Minimal desktop window height.
pub const MIN_HEIGHT: f32 = 630.0 + Root::WINDOW_TITLE_HEIGHT + Self::FRAME_MARGIN;
pub const MIN_HEIGHT: f32 = 630.0 + Content::WINDOW_TITLE_HEIGHT + Self::FRAME_MARGIN;
/// Application configuration file name.
pub const FILE_NAME: &'static str = "app.toml";