Fixes to RCC

This commit is contained in:
Luke D. Jones
2024-01-05 14:21:31 +13:00
parent f64253d633
commit 6f4a7e16dc
7 changed files with 37 additions and 36 deletions

View File

@@ -62,8 +62,8 @@ fn main() -> Result<()> {
let native_options = eframe::NativeOptions {
vsync: true,
hardware_acceleration: HardwareAcceleration::Preferred,
// min_window_size: Some(egui::vec2(960.0, 670.0)),
// max_window_size: Some(egui::vec2(960.0, 670.0)),
min_window_size: Some(egui::vec2(980.0, 670.0)),
max_window_size: Some(egui::vec2(980.0, 670.0)),
run_and_return: true,
..Default::default()
};
@@ -186,6 +186,13 @@ fn main() -> Result<()> {
&config,
)?;
if cli_parsed.board_name.is_some() || cli_parsed.layout_viewing {
if let Ok(mut lock) = states.lock() {
lock.run_in_bg = false;
running_in_bg.store(false, Ordering::Release);
}
}
if config.enable_tray_icon {
init_tray(supported_properties, states.clone());
}
@@ -212,7 +219,7 @@ fn main() -> Result<()> {
}
if let Ok(lock) = states.try_lock() {
if !lock.run_in_bg || cli_parsed.board_name.is_some() || cli_parsed.layout_viewing {
if !lock.run_in_bg {
break;
}

View File

@@ -3,9 +3,3 @@ mod app_settings;
mod aura_page;
mod fan_curve_page;
mod system_page;
pub use anime_page::*;
pub use app_settings::*;
pub use aura_page::*;
pub use fan_curve_page::*;
pub use system_page::*;

View File

@@ -15,5 +15,3 @@ pub use aura_power::*;
pub use fan_graph::*;
pub use keyboard_layout::*;
pub use rog_bios::*;
pub use side_panel::*;
pub use top_bar::*;

View File

@@ -1,4 +1,4 @@
use egui::{vec2, Align2, FontId, Id, Sense};
use egui::{vec2, Align2, Button, FontId, Id, Rect, RichText, Sense, Vec2};
use crate::{RogApp, VERSION};
@@ -33,15 +33,14 @@ impl RogApp {
FontId::proportional(height - 2.0),
text_color,
);
// // Add the close button:
// let close_response = ui.put(
// Rect::from_min_size(titlebar_rect.right_top(),
// Vec2::splat(height)),
// Button::new(RichText::new("❌").size(height -
// 4.0)).frame(false), );
// if close_response.clicked() {
// frame.close();
// }
// Add the close button:
let close_response = ui.put(
Rect::from_min_size(titlebar_rect.right_top(), Vec2::splat(height)),
Button::new(RichText::new("").size(height - 4.0)).frame(false),
);
if close_response.clicked() {
frame.close();
}
});
});
}