Skip to content

Commit 1d9f705

Browse files
committed
1.1.0
1 parent 3e00976 commit 1d9f705

3 files changed

Lines changed: 18 additions & 9 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "restgap"
3-
version = "1.0.1"
3+
version = "1.1.0"
44
edition = "2024"
55
authors = ["iwangjie <345127857@qq.com>"]
66
description = "息间(RestGap)— 跨平台休息提醒应用(macOS/Windows/Linux)"

src/macos/ui/countdown.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ const KEGEL_HTML_TEMPLATE: &str = r#"<!DOCTYPE html>
2929
<title>Aligned Kegel Guide</title>
3030
<style>
3131
:root {
32+
--page-bg: #f2f0e9;
3233
--card-bg: #f2f0e9;
3334
--text-main: #333333;
3435
--text-sub: #757575;
36+
--text-strong: #1f1f1f;
37+
--text-muted: #6b6b6b;
3538
--font-serif: 'Times New Roman', Times, serif;
3639
--font-sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
3740
--anim-duration: 4s;
@@ -45,7 +48,7 @@ const KEGEL_HTML_TEMPLATE: &str = r#"<!DOCTYPE html>
4548
margin: 0;
4649
padding: 0;
4750
height: 100vh;
48-
background-color: #000;
51+
background-color: var(--page-bg);
4952
display: flex;
5053
justify-content: center;
5154
align-items: center;
@@ -66,7 +69,7 @@ const KEGEL_HTML_TEMPLATE: &str = r#"<!DOCTYPE html>
6669
.title {
6770
font-family: var(--font-sans);
6871
font-size: clamp(18px, 2.4vw, 28px);
69-
color: #e8e5dc;
72+
color: var(--text-strong);
7073
text-align: center;
7174
}
7275
@@ -75,21 +78,21 @@ const KEGEL_HTML_TEMPLATE: &str = r#"<!DOCTYPE html>
7578
font-size: clamp(48px, 7vw, 96px);
7679
font-weight: 700;
7780
font-variant-numeric: tabular-nums;
78-
color: #f2f0e9;
81+
color: var(--text-strong);
7982
line-height: 1;
8083
}
8184
8285
.card {
8386
background-color: var(--card-bg);
8487
width: min(90vw, 600px, calc(70vh * 4 / 3.2));
8588
aspect-ratio: 4 / 3.2;
86-
border-radius: 30px;
89+
border-radius: 0;
8790
display: flex;
8891
flex-direction: column;
8992
justify-content: center;
9093
align-items: center;
9194
position: relative;
92-
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
95+
box-shadow: none;
9396
}
9497
9598
.symbol-area {
@@ -157,7 +160,7 @@ const KEGEL_HTML_TEMPLATE: &str = r#"<!DOCTYPE html>
157160
.hint {
158161
font-family: var(--font-sans);
159162
font-size: clamp(14px, 2vw, 22px);
160-
color: #b5b5b5;
163+
color: var(--text-muted);
161164
text-align: center;
162165
max-width: 80vw;
163166
}
@@ -409,7 +412,13 @@ pub fn show_countdown_window(delegate: &RestGapDelegate, seconds: u64, play_star
409412
if let Some(content_view) = window.contentView() {
410413
content_view.setWantsLayer(true);
411414
}
412-
window.setBackgroundColor(Some(&NSColor::blackColor()));
415+
let background = NSColor::colorWithSRGBRed_green_blue_alpha(
416+
242.0 / 255.0,
417+
240.0 / 255.0,
418+
233.0 / 255.0,
419+
1.0,
420+
);
421+
window.setBackgroundColor(Some(&background));
413422

414423
let html = build_kegel_html(
415424
&texts.countdown_title(),

0 commit comments

Comments
 (0)