mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 17:33:19 +01:00
Fixes to RCC
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user