Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Oldham committed Sep 27, 2024
1 parent ac0f303 commit eb024c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions psst-gui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ fn main() {
WebApi::global().load_local_tracks(state.config.username().unwrap());
} else {
// No configured credentials, open the account setup.
let mut window = ui::account_setup_window();
let window = ui::account_setup_window();

if state.config.kiosk_mode {
window = ui::kiosk_setup_window();
let window = ui::kiosk_setup_window();
} else {

}

delegate = Delegate::with_preferences(window.id);
Expand Down
9 changes: 8 additions & 1 deletion psst-gui/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,16 @@ pub fn main_window(config: &Config) -> WindowDesc<AppState> {
}

pub fn preferences_window() -> WindowDesc<AppState> {
// Change this
let win_size = (theme::grid(50.0), theme::grid(55.0));

// On Windows, the window size includes the titlebar.
let win_size = if cfg!(target_os = "windows") {
const WINDOWS_TITLEBAR_OFFSET: f64 = 56.0;
(win_size.0, win_size.1 + WINDOWS_TITLEBAR_OFFSET)
} else {
win_size
};

let win = WindowDesc::new(preferences_widget())
.title("Preferences")
.window_size(win_size)
Expand Down

0 comments on commit eb024c3

Please sign in to comment.