Compare commits

...
6 Commits
Author SHA1 Message Date
waozi ad0f17ebb7 Fix selected color themes in packaged builds 2026-09-22 11:21:12 -03:00
waozi 85330a2390 Remove the completed kry-migration tracking doc
The migration it tracked is complete: vendor/kryon is at master, app colors
read StyleTokenColor through the app_style bridge, and the native build and
contract gates pass. The stale in-flight pointers (8f1a8608, per-area
remaining-work tables) documented a state twenty commits old.
2026-09-21 15:47:05 -03:00
waozi c9904167b2 Bump Kryon: use the tracked profile picker types and field-order fix 2026-09-21 15:46:06 -03:00
waozi b8ad52294b Show plain numbers while editing rounds 2026-09-21 12:48:19 -03:00
waozi 39a1be8b24 Center session detail text within rows 2026-09-21 12:45:35 -03:00
waozi 9130be924f Clarify session rounds and editing 2026-09-21 12:40:15 -03:00
37 changed files with 541 additions and 280 deletions

No files matched your search

+1
View File
@@ -1,2 +1,3 @@
unpackaged_assets/**/*.ogg filter=lfs diff=lfs merge=lfs -text
test-fixtures/audio/*.mp3 filter=lfs diff=lfs merge=lfs -text
themes/catalog_*.kss whitespace=-blank-at-eof
+8
View File
@@ -1,4 +1,12 @@
# Changelog
## [2.0.6] - 2026-09-22
### Fixed
- Selected app color themes now keep their backgrounds, cards, and text visible. Theme catalogs are included in every build, and an unavailable palette falls back to readable built-in colors.
## [2.0.5] - 2026-09-21
### Changed
- Session details now show the practice name, time, and round count above clearly separated round rows with larger hold times and easier-to-tap edit and delete actions. Editing a round highlights its value and provides a labeled number pad with separate Cancel and Save actions.
## [2.0.4] - 2026-09-21
### Changed
- The account screen shows the connected alias, automatic sync progress, and counts for habits, history days, sessions, friends, lists, and list items.
+11 -2
View File
@@ -400,7 +400,9 @@ FONT_FILES := \
$(FONT_SUBSET_DIR)/NotoSansKR-App-Regular.otf \
$(FONT_SUBSET_DIR)/NotoSansTC-App-Regular.otf
EMBEDDED_ASSETS_C := $(BUILD_OBJ_DIR)/$(APP_NAME)_embedded_assets.c
STYLE_FILES := $(wildcard $(KRYON_DIR)/styles/kryon/*.kss) $(wildcard assets/styles/*.kss)
STYLE_FILES := $(wildcard $(KRYON_DIR)/styles/kryon/*.kss) \
$(wildcard assets/styles/*.kss) \
$(wildcard themes/catalog_*.kss)
IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
IMAGE_FILES += $(wildcard assets/social/*.png)
EMBEDDED_ASSET_FILES := $(STYLE_FILES) $(LOCALE_FILES) $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES)
@@ -1034,7 +1036,14 @@ $(WINDOWS_BIN_DIR)/$(WIN64_ARCH) $(WINDOWS_BIN_DIR)/$(WIN32_ARCH):
FORCE:
$(EMBEDDED_ASSETS_C): Makefile $(EMBEDDED_ASSET_FILES) $(KRYON_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR)
.PHONY: theme-catalog-bundle-check
theme-catalog-bundle-check:
@cmp themes/catalog_light.kss $(KRYON_DIR)/themes/catalog_light.kss
@cmp themes/catalog_dark.kss $(KRYON_DIR)/themes/catalog_dark.kss
test: theme-catalog-bundle-check
$(EMBEDDED_ASSETS_C): Makefile $(EMBEDDED_ASSET_FILES) $(KRYON_DIR)/scripts/embed-assets.sh | $(BUILD_OBJ_DIR) theme-catalog-bundle-check
sh $(KRYON_DIR)/scripts/embed-assets.sh $@ $(EMBEDDED_ASSET_FILES)
$(KRYON_ICON_ASSETS_C) $(KRYON_ICON_NAMES_C) $(KRYON_ICON_TYPES_H): $(KRYON_ICON_FILES) $(KRYON_DIR)/scripts/embed-icon-sheets.py | $(BUILD_OBJ_DIR)
-98
View File
@@ -1,98 +0,0 @@
# Inbe source ownership
## Remaining migration work (2026-09-20)
This section records the committed migration state, not a shipped or fully
verified one. Kryon `master` is clean at `6f141648` with the UI `.kry` moves and
the round records committed; Inbe `vendor/kryon` is pinned to the migration
commit `8f1a8608` and Inbe's migration is committed as `64c1b6b`. Inbe's
`make native` and contract gates pass at that revision; screenshots and
Android/Plan 9/web checks have not run. Kryon's source-level and Button evidence
checklist is in
[the upstream UI migration plan](../../kryon/plan/UI_MIGRATION_REMAINING.md).
| Area | Current state | What closes it |
|---|---|---|
| App UI contract | `src/app/app.h` still has handwritten declarations for screen, widget, route, audio, and presentation functions implemented in `.kry`. `app_fwd.h`, `app_internal.h`, `app_nav.h`, screen/practice headers, and platform headers also need declaration-by-declaration review. | Move UI records and callable contracts into `.kry`, consume k2c-generated headers, and delete redundant handwritten UI declarations without introducing compatibility headers. Keep genuine OS/FFI contracts only. Build all maintained callers after removal. |
| Native C boundary | `src/platform/main_host.c`, `src/app/app_web_bridge.c`, `src/platform/android/{android_device.c,android_insets.c,android_share.c}`, Plan 9 entry/SQLite/import adapters, and `src/storage/storage_json_builder.c` remain. | Audit every branch for UI, lifecycle, theme, and data policy. Move any remaining product decision to `.kry`; document the OS/JNI/JS/SQLite/C-varargs effect left in C. Preserve the checked JSON builder failure contract. |
| Platform UI moves | Screenshot scenes/capture, startup and icon selection, Android lifecycle/share title, Plan 9 app loop and music fallback, and style tokens now have `.kry` owners. | Generate and build the changed sources on each supported path; check screenshot parity, icon installation, Android pause/resume/share, Plan 9 startup/music fallback, and style persistence. The Plan 9 `entry.c` must remain a process adapter only. |
| KSS ownership | `assets/styles/inbe.kss` supplies product presentation and `src/app/app_style.kry` supplies style behavior, but the current generated boundary and all live theme callers have not been reverified. | Review each hardcoded presentation choice and theme getter use, migrate reusable style choices upstream where necessary, then verify light/dark style switching and no-style fallback without changing the accepted appearance. |
| UI test ownership | UI shell checks exist; `tests/app_bottom_nav_test.c`, `frame_pacing_test.c`, `font_locale_test.c`, `screenshot_scene_test.sh`, and other C/UI fixtures still need ownership review. | Move UI behavior/assertions into `.kry` tests where the language can express them, leaving shell/C only for narrow host setup or process checks. Ensure the test graph compiles the generated modules; record exact results. |
| Background notification policy | Desktop tray, Chrome worker, and Android indicator/session code carry committed edits for the rule that no background activity continues without a visible indicator. | Verify close/minimize/reopen, indicator loss, permission denial, Android foreground service and Chrome worker behavior on their actual targets. Confirm no timer or notification survives an absent indicator; record platform evidence. |
| Vendor and delivery | Kryon is committed on upstream `master` and Inbe's clean `vendor/kryon` gitlink is `8f1a8608`; the parent commit `64c1b6b` is clean. | Done: pointer moved by commit and no vendor source edits. Keep the pointer moving only to clean upstream commits. |
Verification requires separate user approval for each test and each Bend law.
After approval, Inbe's `make build-laws` is mandatory for native, web, and
Windows builds; `make clean-text-api-check button-api-check` covers the UI API
guards. Native checks need omega's SDL pkg-config path, and display/input
checks must run on a private Xvfb/Xephyr display with inherited display
variables scrubbed. Record Android, Plan 9, web, and Windows separately;
unavailable toolchains or devices stay unverified.
Most product behavior is maintained in `.kry`: application setup and rendering,
practice and habit rules, account/sync orchestration, database policy, audio
selection, desktop tray menus, screenshot scenes, and browser actions.
`app/app_types.kry` owns the application records and enums. C declarations are
emitted by k2c into the build directory.
The main application uses direct screen dispatch. Tray implementation lives in
`platform/tray.kry`, without a second set of forwarding functions. Native host
startup calls the same `.kry` application setup on each platform.
## UI composition
- Use `Text(TextProps)`, `Image(ImageProps)`, and `Button(ButtonProps)` directly.
- Supply text bounds, font, alignment, and wrapping in props. Bounded one-line
text uses the standard widget's clipping instead of app-owned UTF-8 chopping.
- Put product presentation rules in `assets/styles/inbe.kss`. It augments the
selected Kryon style pack and shares its color tokens.
- `app/widgets.kry` composes the product's panels and guide content from
standard controls. Kryon's shared Modal, Guide, and Reorder policies own
their geometry; Popup owns dismissal and capture for volume sliders.
- Session action rows use shared toolbar geometry and 44-unit buttons with gaps.
Route choices, guide steps, and practice animations remain Inbe behavior.
- Background art and Sun Salutation atlas frames use asset-backed Image props.
Kryon owns image loading, caching, cropping, and contain/cover fitting.
## Native boundary
The frame loop, startup choices, screenshot scenes, native Android session
state transitions and debug practice decisions, and Plan 9 window loop are
authored in `.kry`.
The remaining C handles OS window calls, Android JNI conversion and synchronized
event handoff, browser JavaScript interop, and Plan 9 process entry and system
adapters. Plan 9's music playback, status, and unavailable control behavior are authored in
`platform/plan9/meditation_music.kry`; the Plan 9 C music stub has been removed.
The desktop icon asset is selected in `platform/app_host.kry`; the native host
only decodes and installs it.
These latest moves still require native, Android, and Plan 9 verification.
Android Java still owns notification permission, indicator observation, and
foreground-service effects. The session pause/resume and background-timer
decision is in `platform/android/android_lifecycle.kry`.
Android share-sheet titles are selected by `.kry` callers; the JNI adapter
receives the title with the data it shares.
`storage_json_builder.c` contains only the C varargs bridge; buffer growth,
escaping, failure state, and timestamp serialization live in `storage/json.kry`.
The checked JSON builder is retained because the current Kryon JSON emitter
does not expose the allocation-failure result required by Inbe's sync writer.
Database schemas, setting keys, sync protocol v6, tombstones, and recovery
policy are preserved. This migration does not introduce a data conversion.
## Building and checking
Run `make native test` with the platform's normal build configuration. On omega,
set `PKG_CONFIG_PATH=/home/wao/.local/sdl2/lib/pkgconfig`. The tests consume the
freshly generated app modules, including the font selector and UI metrics.
`make web` and the Android CMake build generate the same `.kry` sources for their
platforms. `make kry-c-plan9` produces Plan 9 C and its source list.
Kryon commit `c645a7016` removes the frontend's 16-constant-per-module limit.
The compiler regression covers a module with 80 constants; language tests cover
C, C++, and Go. Runtime/compiler changes belong upstream on Kryon master, then
come into Inbe through a clean submodule update.
Kryon commit `cde33e956` supplies the Canvas backend's
paint-layer transform capture and restore. Its rendering regression covers
rotation, zoom, and replay from a high-DPI window into a render texture. Web
builds enable Emscripten's zlib port for the shared archive implementation.
+2 -2
View File
@@ -53,8 +53,8 @@ android {
applicationId "xyz.waozi.inbe"
minSdk 21
targetSdk 36
versionCode 128
versionName "2.0.4"
versionCode 130
versionName "2.0.6"
manifestPlaceholders = [
inbeAppLabel: "Inner Breeze",
inbeUsesCleartextTraffic: "false"
+9 -1
View File
@@ -239,7 +239,15 @@ file(GLOB APP_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_RO
file(GLOB APP_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
file(GLOB APP_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/practices/*/banner*.png")
file(GLOB APP_STYLE_ASSETS RELATIVE "${REPO_ROOT}"
"${KRYON_DIR}/styles/kryon/*.kss" "${REPO_ROOT}/assets/styles/*.kss")
"${KRYON_DIR}/styles/kryon/*.kss" "${REPO_ROOT}/assets/styles/*.kss"
"${REPO_ROOT}/themes/catalog_*.kss")
foreach(mode light dark)
file(SHA256 "${REPO_ROOT}/themes/catalog_${mode}.kss" APP_CATALOG_HASH)
file(SHA256 "${KRYON_DIR}/themes/catalog_${mode}.kss" KRYON_CATALOG_HASH)
if(NOT APP_CATALOG_HASH STREQUAL KRYON_CATALOG_HASH)
message(FATAL_ERROR "Packaged ${mode} theme catalog differs from Kryon")
endif()
endforeach()
set(APP_EMBEDDED_INPUTS
${APP_STYLE_ASSETS}
${APP_LOCALE_ASSETS}
@@ -0,0 +1,3 @@
Changed
---
- Session details now show the practice name, time, and round count above clearly separated round rows with larger hold times and easier-to-tap edit and delete actions.
@@ -0,0 +1,3 @@
Fixed
---
- App color themes now keep their backgrounds, cards, and text visible on devices without system palette colors. Theme catalogs are included in every build, and an unavailable palette falls back to readable built-in colors.
+3
View File
@@ -1136,6 +1136,9 @@ Kolo %d %ds
[session_round_label]
KOLO %d
---
[round_number_label]
Kolo %d
---
[notification_starting_seconds]
Start: %ds
---
+3
View File
@@ -1136,6 +1136,9 @@ Runde %d %ds
[session_round_label]
RUNDE %d
---
[round_number_label]
Runde %d
---
[notification_starting_seconds]
Start: %ds
---
+3
View File
@@ -1378,6 +1378,9 @@ Round %d %ds
[session_round_label]
ROUND %d
---
[round_number_label]
Round %d
---
[notification_starting_seconds]
Starting: %ds
---
+3
View File
@@ -1148,6 +1148,9 @@ Ronda %d %ds
[session_round_label]
RONDA %d
---
[round_number_label]
Ronda %d
---
[notification_starting_seconds]
Inicio: %ds
---
+3
View File
@@ -1136,6 +1136,9 @@ Cycle %d %ds
[session_round_label]
CYCLE %d
---
[round_number_label]
Cycle %d
---
[notification_starting_seconds]
Demarrage : %ds
---
+3
View File
@@ -1148,6 +1148,9 @@ Ronde %d %ds
[session_round_label]
RONDE %d
---
[round_number_label]
Ronde %d
---
[notification_starting_seconds]
Mulai: %ds
---
+3
View File
@@ -1136,6 +1136,9 @@ Round
[session_round_label]
Round
---
[round_number_label]
Round %d
---
[notification_starting_seconds]
Avvio: %ds
---
+3
View File
@@ -1138,6 +1138,9 @@ Wim Hof - 開始まで %d秒
[session_round_label]
ラウンド %d
---
[round_number_label]
ラウンド %d
---
[notification_starting_seconds]
開始: %d秒
---
+3
View File
@@ -1136,6 +1136,9 @@ Wim Hof - %d초 후 시작
[session_round_label]
%d 라운드
---
[round_number_label]
%d 라운드
---
[notification_starting_seconds]
시작: %d초
---
+3
View File
@@ -1148,6 +1148,9 @@ Rodada %d %ds
[session_round_label]
RODADA %d
---
[round_number_label]
Rodada %d
---
[notification_starting_seconds]
Inicio: %ds
---
+3
View File
@@ -1136,6 +1136,9 @@ Wim Hof - старт через %d с
[session_round_label]
РАУНД %d
---
[round_number_label]
Раунд %d
---
[notification_starting_seconds]
Старт: %dс
---
+3
View File
@@ -1136,6 +1136,9 @@ Wim Hof - %d 秒后开始
[session_round_label]
第%d轮
---
[round_number_label]
第%d轮
---
[notification_starting_seconds]
开始: %d秒
---
+1 -1
View File
@@ -1,5 +1,5 @@
Package: inbe.waozi
Version: 2.0.4
Version: 2.0.6
Architecture: arm64
Maintainer: Waozi <[email protected]>
Click-Version: 0.4
+1 -1
View File
@@ -28,7 +28,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.4" date="2026-09-21"/>
<release version="2.0.6" date="2026-09-22"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "inbe",
"title": "Inner Breeze",
"version": "2.0.4",
"version": "2.0.6",
"architecture": "arm64",
"framework": "ubuntu-sdk-20.04",
"description": "Syncable breathing, meditation, and habit practice app.",
+1 -1
View File
@@ -2,7 +2,7 @@
"manifest_version": 3,
"name": "Inner Breeze",
"short_name": "Inbe",
"version": "2.0.4",
"version": "2.0.6",
"description": "Breathing, meditation, habit tracking, and encrypted sync.",
"permissions": [
"contextMenus"
+1 -1
View File
@@ -22,7 +22,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.4" date="2026-09-21"/>
<release version="2.0.6" date="2026-09-22"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -22,7 +22,7 @@
<binary>inbe</binary>
</provides>
<releases>
<release version="2.0.4" date="2026-09-21"/>
<release version="2.0.6" date="2026-09-22"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
+1 -1
View File
@@ -6,7 +6,7 @@ description: |
meditation, and habit tracking with visual and audio cues, meditation
timers, habit counters, session history, and optional sync.
version: '2.0.4'
version: '2.0.6'
license: BSD-3-Clause
base: core22
confinement: strict
+2 -14
View File
@@ -85,20 +85,8 @@ IconRowRequest :: struct {
items: const IconRowAction*
}
ProfileImagePickerProps :: struct {
title: const char*
selected_icon_type: IconType*
close_icon_type: int
max_width: int
scroll_offset: int*
}
ProfileImagePickerResult :: struct {
closed: int
changed: int
selected_index: int
selected_icon_type: IconType
}
# ProfileImagePickerProps/Result come from kryon's tracked
# ui_profile_icon_props surface now.
#enum {
SETTINGS_SPEED_MIN = 1
-1
View File
@@ -753,7 +753,6 @@ draw_profile_picture_picker_modal :: (app: InnerBreeze*) #private {
memset(&props, 0, sizeof(props))
props.title = "Profile picture"
props.selected_icon_type = &app->profile_picture_icon
props.close_icon_type = ICON_X
props.max_width = 520
props.scroll_offset = &app->profile_picture_picker_scroll
result = AppProfileImagePickerModal(props)
+7
View File
@@ -138,6 +138,13 @@ app_refresh_theme :: (app: InnerBreeze*) {
}
SetCurrentTheme(app->theme_id, app->dark_mode)
background := GetThemeBackground()
surface := GetThemeSurface()
text_color := GetThemeText()
if background.a == 0 || surface.a == 0 || text_color.a == 0 {
TraceLog(LOG_WARNING, "THEME: Theme palette unavailable; using built-in colors")
SetTheme(app->dark_mode ? ThemeDefaultDark() : ThemeDefaultLight())
}
app_apply_style(app)
}
+1 -1
View File
@@ -35,7 +35,7 @@ AppProfileImagePickerModal :: (modal: ProfileImagePickerProps) -> ProfileImagePi
height = view_height - Scale(24)
}
frame := AppModalFrame(width, height,
modal.title != NULL ? modal.title : "Profile image", 0, modal.close_icon_type)
modal.title != NULL ? modal.title : "Profile image", 0, modal.close_icon.id != 0 ? ICON_X : 0)
if frame.right_clicked {
result.closed = 1
return result
+2 -2
View File
@@ -3,7 +3,7 @@
#define APP_VERSION_MAJOR 2
#define APP_VERSION_MINOR 0
#define APP_VERSION_PATCH 4
#define APP_VERSION_STRING "2.0.4"
#define APP_VERSION_PATCH 6
#define APP_VERSION_STRING "2.0.6"
#endif
+126 -147
View File
@@ -41,83 +41,6 @@ text_filter :: (codepoint: int, user_data: void*) -> int #private {
return 0
}
last_substring :: (text_value: const char*, needle: const char*) -> const char* #private {
match: const char* = nil
cursor: const char* = nil
needle_len: size_t = 0
if text_value == nil || needle == nil || needle[0] == '\0' {
return nil
}
needle_len = strlen(needle)
cursor = text_value
while (cursor = strstr(cursor, needle)) != nil {
match = cursor
cursor += needle_len
}
return match
}
draw_round_line :: (line_text: const char*, seconds_text: const char*,
x: int, y: int, w: int, h: int, font: int,
editing: int) #private {
value_at: const char* = nil
suffix: const char* = nil
prefix: [64] char = {0}
prefix_len: size_t = 0
text_y := 0
draw_x := 0
if !editing {
Text((TextProps){
.bounds={(float)x, (float)y, (float)w, (float)h},
.text=(line_text),
.wrap=TextWrapNone
})
return
}
value_at = last_substring(line_text, seconds_text)
if value_at == nil {
Text((TextProps){
.bounds={(float)x, (float)y, (float)w, (float)h},
.text=(line_text),
.wrap=TextWrapNone
})
return
}
prefix_len = (size_t)(value_at - line_text)
if prefix_len >= sizeof(prefix) {
prefix_len = sizeof(prefix) - 1
}
memcpy(prefix, line_text, prefix_len)
prefix[prefix_len] = '\0'
suffix = value_at + strlen(seconds_text)
text_y = AppControlTextY(line_text, y, h, font)
draw_x = x
Text((TextProps){
.bounds={(draw_x), (text_y), 0, 0},
.text=(prefix),
.wrap=TextWrapNone
})
draw_x += AppTextWidth(prefix, font)
Text((TextProps){
.bounds={(draw_x), (text_y), 0, 0},
.text=(seconds_text),
.wrap=TextWrapNone
})
draw_x += AppTextWidth(seconds_text, font)
Text((TextProps){
.bounds={(draw_x), (text_y), 0, 0},
.text=(suffix),
.wrap=TextWrapNone
})
}
delete_round :: (entry: const HabitLinkedEntry*, round: int) -> int #private {
rounds: [MaxRounds] int
out_count := 0
@@ -256,9 +179,10 @@ draw_edit_screen :: (app: InnerBreeze*) {
draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
content_x: int, content_w: int, y: int,
draw: int) -> int {
row_h := Scale(34)
section_gap := Scale(10)
section_h := Scale(28)
row_h := Scale(48)
section_gap := Scale(22)
title_h := Scale(38)
summary_h := Scale(40)
if app == nil || ctx == nil {
return y
@@ -272,7 +196,7 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
.wrap=TextWrapNone
})
}
return y + row_h
return y + summary_h
}
for int activity = 0; activity < EXERCISE_COUNT; activity++ {
@@ -288,24 +212,24 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
continue
}
title := practice_activity_label(activity)
if draw {
Text((TextProps){
.bounds={(content_x), (y), 0, 0},
.text=(practice_activity_label(activity)),
.bounds={(content_x), (y), (content_w), (title_h)},
.text=(title),
.font=AppTitleFontSize(title, content_w),
.wrap=TextWrapNone
})
}
y += section_h
y += Scale(16)
for int i = 0; i < ctx->count; i++ {
time_text: [16] char = {0}
summary_text: [32] char = {0}
icon_size := Scale(18)
icon_padding := Scale(6)
icon_w := icon_size + icon_padding * 2
icon_w := Scale(40)
trash_x := content_x + content_w - icon_w
row_font := AppSmallFontSize()
summary_x := 0
row_font := AppFontSize()
summary_x := content_x + Scale(100)
if ctx->entries[i].activity != activity {
continue
@@ -327,28 +251,28 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
"results_rounds",
ctx->entries[i].round_count)
}
summary_x = content_x + Scale(76)
summary_too_wide := summary_x + AppTextWidth(summary_text, row_font) > trash_x - Scale(8)
if summary_too_wide {
summary_x = content_x + Scale(62)
summary_x = content_x + Scale(68)
}
if draw {
Text((TextProps){
.bounds={(content_x), (AppControlTextY(time_text, y, row_h, row_font)), 0, 0},
.bounds={(content_x), (y), (summary_x - content_x - Scale(8)), (summary_h)},
.text=(time_text),
.wrap=TextWrapNone
.font=row_font,
.wrap=TextWrapNone, .vertical_align=TextAlignCenter
})
Text((TextProps){
.bounds={(summary_x), (AppControlTextY(summary_text, y, row_h, row_font)), 0, 0},
.bounds={(summary_x), (y), (trash_x - summary_x - Scale(8)), (summary_h)},
.text=(summary_text),
.wrap=TextWrapNone
.font=row_font,
.wrap=TextWrapNone, .vertical_align=TextAlignCenter
})
if Button((ButtonProps){
if !app->habit_session_edit.active && Button((ButtonProps){
.id = 0,
.bounds = {(float)(trash_x), (float)(y - Scale(4)),
(float)((icon_size) + (icon_padding) * 2),
(float)((icon_size) + (icon_padding) * 2)},
.bounds = {(float)(trash_x), (float)(y + (summary_h - icon_w) / 2),
(float)(icon_w), (float)(icon_w)},
.icon_type = ICON_TRASH, .icon_only = 1,
.tone = ButtonToneNeutral, .emphasis = ButtonEmphasisSoft
}) {
@@ -358,8 +282,11 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
habit_session_cancel_edit(app)
return y
}
Line(content_x, y + summary_h + Scale(8),
content_x + content_w, y + summary_h + Scale(8),
Fade(StyleTokenColor("text"), 0.22f))
}
y += row_h
y += summary_h + Scale(18)
if activity == EXERCISE_MEDITATION ||
activity == EXERCISE_SUN_SALUTATION {
@@ -368,60 +295,73 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
}
for int r = 0; r < ctx->entries[i].round_count; r++ {
round_line: [64] char = {0}
round_seconds: [16] char = {0}
round_label: [64] char = {0}
round_value: [24] char = {0}
round_trash_x := content_x + content_w - icon_w
round_edit_x := round_trash_x - icon_w - Scale(4)
round_text_x := content_x + Scale(16)
round_text_w := round_edit_x - round_text_x - Scale(8)
round_edit_x := round_trash_x - icon_w - Scale(8)
value_x := content_x + content_w / 3
value_w := round_edit_x - value_x - Scale(8)
editing_round: int = app->habit_session_edit.active &&
app->habit_session_edit.kind == HABIT_SESSION_EDIT_ROUND &&
app->habit_session_edit.round == r &&
strcmp(app->habit_session_edit.path,
ctx->entries[i].path) == 0
value_text_x := editing_round ? value_x - Scale(8) : value_x
value_text_w := editing_round ? Scale(78) : value_w
FormatLocaleText(round_line, sizeof(round_line),
"round_result_label", r + 1,
ctx->entries[i].rounds[r])
FormatLocaleText(round_label, sizeof(round_label),
"round_number_label", r + 1)
if editing_round {
snprintf(round_value, sizeof(round_value), "%s",
app->habit_session_edit.text)
} else {
FormatLocaleText(round_value, sizeof(round_value),
"results_metric_seconds",
ctx->entries[i].rounds[r])
}
if draw {
if editing_round {
FormatLocaleText(round_line, sizeof(round_line),
"round_result_label", r + 1,
atoi(app->habit_session_edit.text))
selection: Rectangle = {(float)content_x, (float)y,
(float)content_w, (float)row_h}
DrawRectangleRounded(selection, 0.12f, 8,
Fade(StyleTokenColor("surface"), 0.75f))
DrawRectangleRoundedLinesEx(selection, 0.12f, 8, 1.0f,
Fade(StyleTokenColor("text"), 0.55f))
value_field: Rectangle = {(float)(value_x - Scale(8)),
(float)(y + Scale(5)),
(float)Scale(78),
(float)(row_h - Scale(10))}
DrawRectangleRoundedLinesEx(value_field, 0.12f, 8, 1.0f,
StyleTokenColor("text"))
}
snprintf(round_seconds, sizeof(round_seconds), "%d",
editing_round
? atoi(app->habit_session_edit.text)
: ctx->entries[i].rounds[r])
if round_text_w < Scale(80) {
round_text_w = Scale(80)
}
draw_round_line(round_line, round_seconds, round_text_x,
y, round_text_w, Scale(24),
row_font, editing_round)
if Button((ButtonProps){
Text((TextProps){
.bounds={(content_x), (y),
(value_x - content_x - Scale(8)), (row_h)},
.text=(round_label), .font=row_font,
.wrap=TextWrapNone, .vertical_align=TextAlignCenter
})
Text((TextProps){
.bounds={(value_text_x), (y), (value_text_w), (row_h)},
.text=(round_value), .font=Scale(19),
.wrap=TextWrapNone,
.align=editing_round ? TextAlignCenter : TextAlignStart,
.vertical_align=TextAlignCenter
})
if !app->habit_session_edit.active && Button((ButtonProps){
.id = 0,
.bounds = {(float)(round_edit_x), (float)(y - Scale(6)),
(float)((icon_size) + (icon_padding) * 2),
(float)((icon_size) + (icon_padding) * 2)},
.icon_type = editing_round ? ICON_SAVE : ICON_EDIT,
.bounds = {(float)(round_edit_x), (float)(y + (row_h - icon_w) / 2),
(float)(icon_w), (float)(icon_w)},
.icon_type = ICON_EDIT,
.icon_only = 1,
.tone = ButtonToneNeutral, .emphasis = ButtonEmphasisSoft
}) {
if editing_round {
if habit_session_commit_edit(app, &ctx->entries[i]) {
return y
}
} else {
begin_round_edit(app, &ctx->entries[i], r)
}
begin_round_edit(app, &ctx->entries[i], r)
return y
}
if Button((ButtonProps){
if !app->habit_session_edit.active && Button((ButtonProps){
.id = 0,
.bounds = {(float)(round_trash_x), (float)(y - Scale(6)),
(float)((icon_size) + (icon_padding) * 2),
(float)((icon_size) + (icon_padding) * 2)},
.bounds = {(float)(round_trash_x), (float)(y + (row_h - icon_w) / 2),
(float)(icon_w), (float)(icon_w)},
.icon_type = ICON_TRASH, .icon_only = 1,
.tone = ButtonToneNeutral, .emphasis = ButtonEmphasisSoft
}) {
@@ -431,10 +371,12 @@ draw_edit_content :: (app: InnerBreeze*, ctx: HabitLinkedContext*,
habit_session_cancel_edit(app)
return y
}
Line(content_x, y + row_h, content_x + content_w,
y + row_h, Fade(StyleTokenColor("text"), 0.22f))
}
y += Scale(28)
y += row_h
}
y += Scale(4)
y += Scale(12)
}
y += section_gap
}
@@ -506,6 +448,8 @@ keyboard_height :: (app: InnerBreeze*) -> int {
key_h := Scale(48)
gap := Scale(6)
pad := Scale(10)
header_h := Scale(54)
action_h := Scale(44)
#if !ANDROID {
if app == nil || !app->on_screen_keyboard_enabled {
@@ -515,7 +459,7 @@ keyboard_height :: (app: InnerBreeze*) -> int {
if app == nil || !app->habit_session_edit.active {
return 0
}
return pad * 2 + key_h * 4 + gap * 3
return pad * 2 + header_h + key_h * 4 + gap * 4 + action_h
}
draw_keyboard :: (app: InnerBreeze*, entry: const HabitLinkedEntry*) -> int {
@@ -523,16 +467,20 @@ draw_keyboard :: (app: InnerBreeze*, entry: const HabitLinkedEntry*) -> int {
"1", "2", "3",
"4", "5", "6",
"7", "8", "9",
"DEL", "0", "OK"
"DEL", "0", ""
}
key_h := Scale(48)
gap := Scale(6)
pad := Scale(10)
header_h := Scale(54)
action_h := Scale(44)
keyboard_h := habit_session_keyboard_height(app)
x := GetPageSidePadding()
y := view_height - keyboard_h
w := view_width - x * 2
key_w := (w - gap * 2) / 3
round_label: [64] char = {0}
value_label: [24] char = {0}
#if !ANDROID {
if app == nil || !app->on_screen_keyboard_enabled {
@@ -547,11 +495,26 @@ draw_keyboard :: (app: InnerBreeze*, entry: const HabitLinkedEntry*) -> int {
DarkenColor(StyleTokenColor("canvas"), 10))
DrawLine(0, y, view_width, y, DarkenColor(StyleTokenColor("canvas"), 42))
for int i = 0; i < 12; i++ {
FormatLocaleText(round_label, sizeof(round_label),
"round_number_label", app->habit_session_edit.round + 1)
snprintf(value_label, sizeof(value_label), "%s",
app->habit_session_edit.text)
Text((TextProps){
.bounds={(x), (y + pad), (w), (Scale(22))},
.text=(round_label), .font=AppFontSize(),
.wrap=TextWrapNone, .align=TextAlignCenter
})
Text((TextProps){
.bounds={(x), (y + pad + Scale(24)), (w), (Scale(28))},
.text=(value_label), .font=Scale(24),
.wrap=TextWrapNone, .align=TextAlignCenter
})
for int i = 0; i < 11; i++ {
col := i % 3
row := i / 3
key_x := x + col * (key_w + gap)
key_y := y + pad + row * (key_h + gap)
key_y := y + pad + header_h + row * (key_h + gap)
if Button((ButtonProps){
.bounds = {(float)(key_x), (float)(key_y), (float)(key_w), (float)(key_h)},
@@ -562,16 +525,32 @@ draw_keyboard :: (app: InnerBreeze*, entry: const HabitLinkedEntry*) -> int {
}) {
if i == 9 {
habit_session_delete_before_cursor(app)
} else if i == 11 {
if habit_session_commit_edit(app, entry) {
return 1
}
} else {
habit_session_insert_char(app, labels[i][0])
}
}
}
action_y := y + pad + header_h + key_h * 4 + gap * 4
action_w := (w - gap) / 2
if Button((ButtonProps){
.bounds={(float)x, (float)action_y, (float)action_w, (float)action_h},
.label=GetLocaleText("cancel_button"),
.tone=ButtonToneNeutral, .emphasis=ButtonEmphasisSoft
}) {
habit_session_cancel_edit(app)
return 1
}
if Button((ButtonProps){
.bounds={(float)(x + action_w + gap), (float)action_y,
(float)action_w, (float)action_h},
.label=GetLocaleText("save_button")
}) {
if habit_session_commit_edit(app, entry) {
return 1
}
}
return 0
}
+159
View File
@@ -0,0 +1,159 @@
@pack catalog-dark;
@version 1;
tokens {
color {
background: #202020FF;
surface: #303030FF;
text: #F0F0F0FF;
circle: #808080FF;
button: #404040FF;
button_hover: #585858FF;
icon: #F0F0F0FF;
link: #80A0FFFF;
}
}
@theme sky_dark {
background: #182838FF;
surface: #223648FF;
text: #B0D0EAFF;
circle: #5080B0FF;
button: #305070FF;
button_hover: #407090FF;
icon: #B0D0EAFF;
link: #60A0D0FF;
}
@theme ocean_dark {
background: #102540FF;
surface: #1C3450FF;
text: #98C0DEFF;
circle: #306090FF;
button: #204060FF;
button_hover: #305575FF;
icon: #98C0DEFF;
link: #5090C0FF;
}
@theme forest_dark {
background: #153020FF;
surface: #203C2AFF;
text: #B4D0B4FF;
circle: #356545FF;
button: #254530FF;
button_hover: #305540FF;
icon: #B4D0B4FF;
link: #508060FF;
}
@theme sunset_dark {
background: #301810FF;
surface: #3E2418FF;
text: #E0B090FF;
circle: #804028FF;
button: #502818FF;
button_hover: #603525FF;
icon: #E0B090FF;
link: #C05030FF;
}
@theme lavender_dark {
background: #201530FF;
surface: #2E2042FF;
text: #C4A8D0FF;
circle: #503570FF;
button: #352050FF;
button_hover: #453065FF;
icon: #C4A8D0FF;
link: #9060B0FF;
}
@theme cherry_dark {
background: #301520FF;
surface: #40202AFF;
text: #D298A8FF;
circle: #703045FF;
button: #452028FF;
button_hover: #553038FF;
icon: #D298A8FF;
link: #B04060FF;
}
@theme dawn_dark {
background: #27222CFF;
surface: #352D38FF;
text: #E9C7B7FF;
circle: #B85F60FF;
button: #3A6B70FF;
button_hover: #4D8385FF;
icon: #E9C7B7FF;
link: #D07267FF;
}
@theme sage_dark {
background: #1F2A22FF;
surface: #2D3A30FF;
text: #C7D4C0FF;
circle: #5F8165FF;
button: #3C5440FF;
button_hover: #4E6650FF;
icon: #C7D4C0FF;
link: #8BA070FF;
}
@theme ink_dark {
background: #251A12FF;
surface: #332418FF;
text: #F1D8B0FF;
circle: #A36532FF;
button: #5A3C24FF;
button_hover: #724B2CFF;
icon: #F1D8B0FF;
link: #D59152FF;
}
@theme default_dark {
background: #202020FF;
surface: #303030FF;
text: #F0F0F0FF;
circle: #808080FF;
button: #404040FF;
button_hover: #585858FF;
icon: #F0F0F0FF;
link: #80A0FFFF;
}
@theme mint_dark {
background: #122D28FF;
surface: #1B3B34FF;
text: #B9E4D5FF;
circle: #2E8272FF;
button: #25554BFF;
button_hover: #32695EFF;
icon: #B9E4D5FF;
link: #6EC8B0FF;
}
@theme cobalt_dark {
background: #121833FF;
surface: #1B2445FF;
text: #C2CCF5FF;
circle: #384CA8FF;
button: #273573FF;
button_hover: #34458BFF;
icon: #C2CCF5FF;
link: #8EA0F0FF;
}
@theme sweet_dark {
background: #161925FF;
surface: #181B28FF;
text: #C3C7D1FF;
circle: #C50ED2FF;
button: #202435FF;
button_hover: #C50ED2FF;
icon: #C3C7D1FF;
link: #E323F0FF;
}
+159
View File
@@ -0,0 +1,159 @@
@pack catalog-light;
@version 1;
tokens {
color {
background: #C0C0C0FF;
surface: #D4D0C8FF;
text: #000000FF;
circle: #808080FF;
button: #C0C0C0FF;
button_hover: #E8E8E8FF;
icon: #000000FF;
link: #000080FF;
}
}
@theme sky_light {
background: #E2EEFCFF;
surface: #D4E4F5FF;
text: #24487CFF;
circle: #7EB7E6FF;
button: #A6CFF2FF;
button_hover: #689ED7FF;
icon: #E2EEFCFF;
link: #4A90E2FF;
}
@theme ocean_light {
background: #D0E8F8FF;
surface: #C0DDEEFF;
text: #1A4070FF;
circle: #5AA0D0FF;
button: #80C0E0FF;
button_hover: #4090D0FF;
icon: #D0E8F8FF;
link: #2080C0FF;
}
@theme forest_light {
background: #E0F0E0FF;
surface: #D1E5D1FF;
text: #2A5030FF;
circle: #60B070FF;
button: #A0D0B0FF;
button_hover: #70C090FF;
icon: #E0F0E0FF;
link: #409050FF;
}
@theme sunset_light {
background: #F8E8D8FF;
surface: #ECD8C6FF;
text: #502814FF;
circle: #D08050FF;
button: #F0C0A0FF;
button_hover: #E09060FF;
icon: #F8E8D8FF;
link: #C06030FF;
}
@theme lavender_light {
background: #F0E8F8FF;
surface: #E2D7EEFF;
text: #402860FF;
circle: #9070B0FF;
button: #C0A0D0FF;
button_hover: #A080C0FF;
icon: #F0E8F8FF;
link: #705090FF;
}
@theme cherry_light {
background: #F8D8E0FF;
surface: #ECC9D2FF;
text: #602030FF;
circle: #D06080FF;
button: #F0A0B0FF;
button_hover: #E07090FF;
icon: #F8D8E0FF;
link: #C04060FF;
}
@theme dawn_light {
background: #F5E9DFFF;
surface: #E7D9D0FF;
text: #393B4AFF;
circle: #E07A6DFF;
button: #8FCFC6FF;
button_hover: #62B8B0FF;
icon: #F5E9DFFF;
link: #C8625CFF;
}
@theme sage_light {
background: #E8ECDFFF;
surface: #D9E0D0FF;
text: #354438FF;
circle: #82A07DFF;
button: #B6C9A6FF;
button_hover: #94AF84FF;
icon: #E8ECDFFF;
link: #5D8268FF;
}
@theme ink_light {
background: #F3E4C8FF;
surface: #E4CFAAFF;
text: #3F2B1CFF;
circle: #B8763FFF;
button: #D8B072FF;
button_hover: #C79151FF;
icon: #F8EED6FF;
link: #8F5B2FFF;
}
@theme default_light {
background: #C0C0C0FF;
surface: #D4D0C8FF;
text: #000000FF;
circle: #808080FF;
button: #C0C0C0FF;
button_hover: #E8E8E8FF;
icon: #000000FF;
link: #000080FF;
}
@theme mint_light {
background: #E4F4EEFF;
surface: #D2E7DFFF;
text: #1E453AFF;
circle: #4BB69AFF;
button: #98D8C6FF;
button_hover: #70C7B2FF;
icon: #E4F4EEFF;
link: #2D8F78FF;
}
@theme cobalt_light {
background: #E7EAF4FF;
surface: #D7DDECFF;
text: #19274AFF;
circle: #4F67C8FF;
button: #A9B8EFFF;
button_hover: #7D92E0FF;
icon: #E7EAF4FF;
link: #354FB5FF;
}
@theme sweet_light {
background: #EEEEEEFF;
surface: #ECECECFF;
text: #31363DFF;
circle: #C50ED2FF;
button: #D5D5D5FF;
button_hover: #C50ED2FF;
icon: #31363DFF;
link: #E323F0FF;
}
+1 -1
+4 -4
View File
@@ -6,8 +6,8 @@ IDI_APP_ICON ICON "inbe.ico"
IDI_NOTIFICATION_ICON ICON "inbe.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,4,0
PRODUCTVERSION 2,0,4,0
FILEVERSION 2,0,6,0
PRODUCTVERSION 2,0,6,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -24,11 +24,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "waozi"
VALUE "FileDescription", "Inner Breeze"
VALUE "FileVersion", "2.0.4"
VALUE "FileVersion", "2.0.6"
VALUE "InternalName", "inbe"
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
VALUE "ProductName", "Inner Breeze"
VALUE "ProductVersion", "2.0.4"
VALUE "ProductVersion", "2.0.6"
END
END
BLOCK "VarFileInfo"