Tighten TimeSpinner spacing and fix build warnings

Reduce gap between numbers and h/m unit labels in the workday
schedule spinners. Remove unused parse_hour function and fix
Svelte state_referenced_locally warning in BreakScreen.
This commit is contained in:
Your Name
2026-02-07 11:12:13 +02:00
parent d93d231a45
commit b01dbd6c0b
3 changed files with 5 additions and 13 deletions

View File

@@ -462,14 +462,6 @@ pub enum IdleCheckResult {
NaturalBreakDetected(u64), // duration in seconds
}
fn parse_hour(time_str: &str) -> u32 {
time_str
.split(':')
.next()
.and_then(|h| h.parse().ok())
.unwrap_or(9)
}
/// Returns the number of seconds since last user input (mouse/keyboard).
#[cfg(windows)]
pub fn get_idle_seconds() -> u64 {

View File

@@ -13,7 +13,7 @@
let { standalone = false }: Props = $props();
const appWindow = standalone ? getCurrentWebviewWindow() : null;
const appWindow = $derived(standalone ? getCurrentWebviewWindow() : null);
let currentActivity = $state<BreakActivity>(pickRandomActivity());
let activityCycleTimer: ReturnType<typeof setInterval> | null = null;

View File

@@ -324,14 +324,14 @@
.time-spinner {
display: inline-flex;
align-items: center;
gap: 4px;
gap: 2px;
user-select: none;
touch-action: none;
}
.wheel-field {
position: relative;
width: 50px;
width: 44px;
height: 36px;
border-radius: 8px;
background: rgba(255, 255, 255, 0.05);
@@ -376,13 +376,13 @@
line-height: 1;
backface-visibility: hidden;
pointer-events: none;
padding-right: 12px;
padding-right: 6px;
}
/* Unit label pinned to the right of the field */
.unit-badge {
position: absolute;
right: 5px;
right: 3px;
top: 50%;
transform: translateY(-50%);
font-size: 10px;