Skip to content

Commit

Permalink
This should make preferences large
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Oldham committed Sep 27, 2024
1 parent c91c77c commit b3fc3e5
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions psst-gui/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ pub fn main_window(config: &Config) -> WindowDesc<AppState> {
win = win
.set_window_state(WindowState::Maximized)
.resizable(false)
.show_titlebar(false)
.set_always_on_top(true);
.show_titlebar(false);

// Set the window size to the primary monitor's work area and position it at (0, 0)
if let Some(monitor) = druid::Screen::get_monitors().first() {
Expand Down Expand Up @@ -94,6 +93,13 @@ pub fn preferences_window(config: &Config) -> WindowDesc<AppState> {
.transparent_titlebar(true);

if config.kiosk_mode {
if let Some(monitor) = druid::Screen::get_monitors().first() {
let work_area = monitor.virtual_work_rect();
win = win
.window_size(work_area.size())
.set_position(druid::Point::new(0.0, 0.0));
}

win = win
.set_window_state(WindowState::Maximized)
.resizable(false)
Expand Down Expand Up @@ -124,13 +130,22 @@ pub fn account_setup_window() -> WindowDesc<AppState> {
}

pub fn kiosk_setup_window() -> WindowDesc<AppState> {
let win = WindowDesc::new(kiosk_setup_widget())

let mut win = WindowDesc::new(kiosk_setup_widget())
.title("Setup")
.resizable(false)
.show_title(false)
.set_window_state(WindowState::Maximized)
.show_titlebar(false)
.transparent_titlebar(true);

if let Some(monitor) = druid::Screen::get_monitors().first() {
let work_area = monitor.virtual_work_rect();
win = win
.window_size(work_area.size())
.set_position(druid::Point::new(0.0, 0.0));
}

if cfg!(target_os = "macos") {
win.menu(menu::main_menu)
} else {
Expand Down

0 comments on commit b3fc3e5

Please sign in to comment.