Compare commits

...
1 Commits
Author SHA1 Message Date
waozi 86e529db36 polish theme and translations 2026-06-27 15:37:08 -03:00
25 changed files with 412 additions and 133 deletions

No files matched your search

+4
View File
@@ -1,4 +1,8 @@
# Changelog
## [1.6.3] - 2026-06-27
## Changed
- Improve theme, habit, and localization UI polish
## [1.6.2] - 2026-06-27
## Changed
- Improve sun salutation
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 102 KiB

+2 -2
View File
@@ -35,8 +35,8 @@ android {
defaultConfig {
minSdk 21
targetSdk 35
versionCode 58
versionName "1.6.2"
versionCode 59
versionName "1.6.3"
}
@@ -0,0 +1 @@
- Improve theme, habit, and localization UI polish
+25 -10
View File
@@ -305,10 +305,19 @@ Pauza po kole
Pokročilé ovládání sezení
---
[double_tap_to_breathe_label]
Double tap to breathe
Dvojí klepnutí pro nádech
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Dvakrát klepněte na obrazovku pro nádech
---
[session_count_singular]
%d sezení
---
[session_count_plural]
%d sezení
---
[no_sessions]
Žádná sezení
---
[hold_display_label]
Zobrazeni zadrze
@@ -323,7 +332,7 @@ Kruh
Hlasitost
---
[show_session_volume_control_label]
Zobrazit ovladani hlasitosti
Zobrazit ovládání hlasitosti
---
[reset_to_defaults_label]
Obnovit výchozí
@@ -549,7 +558,7 @@ Oceán
Les
---
[theme_sunset]
Západ slunce
Soumrak
---
[theme_lavender]
Levandule
@@ -738,10 +747,10 @@ Název
Podtržení
---
[habit_practice_list_title]
Session Data From
Data sezení z
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Vyberte, která cvičební sezení se počítají do tohoto návyku. Odpovídající dny se zobrazí jako splněné a mohou otevřít editor sezení.
---
[habit_counting_title]
Počítání
@@ -800,6 +809,12 @@ Celková zádrž
[habit_stats_best_streak]
Nejlepší série
---
[habit_stats_day_singular]
%d den
---
[habit_stats_day_plural]
%d dní
---
[bottom_nav_customize_button]
Upravit spodní navigaci
---
@@ -871,13 +886,13 @@ Karty
---
[transition_label]
Transition
Přechod
[transition_none]
None
Žádný
[transition_fade]
Fade
Prolnutí
[theme_picker_title]
Choose Theme
Vybrat motiv
[skip_button]
Skip
---
+27 -12
View File
@@ -305,10 +305,19 @@ Pause nach Runde
Erweiterte Sitzungssteuerung
---
[double_tap_to_breathe_label]
Double tap to breathe
Doppeltippen zum Atmen
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Doppeltippe auf den Bildschirm, um zu atmen
---
[session_count_singular]
%d Sitzung
---
[session_count_plural]
%d Sitzungen
---
[no_sessions]
Keine Sitzungen
---
[hold_display_label]
Atemhalteanzeige
@@ -323,7 +332,7 @@ Kreis
Lautstärke
---
[show_session_volume_control_label]
Lautstaerkeregler anzeigen
Lautstärkeregler anzeigen
---
[reset_to_defaults_label]
Auf Standard zurücksetzen
@@ -549,7 +558,7 @@ Ozean
Wald
---
[theme_sunset]
Sonnenuntergang
Abendrot
---
[theme_lavender]
Lavendel
@@ -738,10 +747,10 @@ Bezeichnung
Unterstreichung
---
[habit_practice_list_title]
Session Data From
Sitzungsdaten aus
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Wähle, welche Übungssitzungen für diese Gewohnheit zählen. Passende Tage werden als erledigt angezeigt und können den Sitzungseditor öffnen.
---
[habit_counting_title]
Zählen
@@ -800,6 +809,12 @@ Gesamte Atemhaltezeit
[habit_stats_best_streak]
Beste Serie
---
[habit_stats_day_singular]
%d Tag
---
[habit_stats_day_plural]
%d Tage
---
[bottom_nav_customize_button]
Untere Navigation anpassen
---
@@ -864,20 +879,20 @@ Sieh dir hier deine Gewohnheitsstatistiken an.
Navigation
---
[nav_mode_dropdown]
Dropdown
Liste
---
[nav_mode_tabbar]
Tabs
Reiter
---
[transition_label]
Transition
Übergang
[transition_none]
None
Keine
[transition_fade]
Fade
Blende
[theme_picker_title]
Choose Theme
Thema wählen
[skip_button]
Skip
---
+16 -1
View File
@@ -370,6 +370,15 @@ Double tap to breathe
[double_tap_to_breathe_hint]
Double tap screen to breathe
---
[session_count_singular]
%d session
---
[session_count_plural]
%d sessions
---
[no_sessions]
No sessions
---
[hold_display_label]
Hold display
---
@@ -780,7 +789,7 @@ Name
Underline
---
[habit_practice_list_title]
Practice list
Session data from
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
@@ -842,6 +851,12 @@ Total hold
[habit_stats_best_streak]
Best streak
---
[habit_stats_day_singular]
%d day
---
[habit_stats_day_plural]
%d days
---
[bottom_nav_customize_button]
Customize bottom navigation
---
+23 -8
View File
@@ -305,10 +305,19 @@ Pausa después de ronda
Controles avanzados de sesión
---
[double_tap_to_breathe_label]
Double tap to breathe
Doble toque para respirar
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Toca dos veces la pantalla para respirar
---
[session_count_singular]
%d sesión
---
[session_count_plural]
%d sesiones
---
[no_sessions]
Sin sesiones
---
[hold_display_label]
Visualizacion de retencion
@@ -738,10 +747,10 @@ Nombre
Subrayado
---
[habit_practice_list_title]
Session Data From
Datos de sesión
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Elige qué sesiones de práctica cuentan para este hábito. Los días coincidentes se muestran como completados y pueden abrir el editor de sesión.
---
[habit_counting_title]
Conteo
@@ -800,6 +809,12 @@ Retención total
[habit_stats_best_streak]
Mejor racha
---
[habit_stats_day_singular]
%d día
---
[habit_stats_day_plural]
%d días
---
[bottom_nav_customize_button]
Personalizar navegación inferior
---
@@ -871,13 +886,13 @@ Pestañas
---
[transition_label]
Transition
Transición
[transition_none]
None
Ninguna
[transition_fade]
Fade
Fundido
[theme_picker_title]
Choose Theme
Elegir tema
[skip_button]
Skip
---
+25 -10
View File
@@ -308,10 +308,19 @@ Pause après cycle
Contrôles avancés de séance
---
[double_tap_to_breathe_label]
Double tap to breathe
Double toucher pour respirer
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Touchez deux fois l'écran pour respirer
---
[session_count_singular]
%d session
---
[session_count_plural]
%d sessions
---
[no_sessions]
Aucune session
---
[hold_display_label]
Affichage de la retention
@@ -326,7 +335,7 @@ Cercle
Volume
---
[show_session_volume_control_label]
Afficher le controle du volume
Afficher le contrôle du volume
---
[reset_to_defaults_label]
Réinitialiser
@@ -552,7 +561,7 @@ Océan
Forêt
---
[theme_sunset]
Coucher de soleil
Crépuscule
---
[theme_lavender]
Lavande
@@ -780,10 +789,10 @@ Nom
Soulignement
---
[habit_practice_list_title]
Session Data From
Données de session
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Choisissez quelles sessions de pratique comptent pour cette habitude. Les jours correspondants sont marqués comme faits et peuvent ouvrir l'éditeur de session.
---
[habit_counting_title]
Comptage
@@ -842,6 +851,12 @@ Rétention totale
[habit_stats_best_streak]
Meilleure série
---
[habit_stats_day_singular]
%d jour
---
[habit_stats_day_plural]
%d jours
---
[bottom_nav_customize_button]
Personnaliser la navigation du bas
---
@@ -913,13 +928,13 @@ Onglets
---
[transition_label]
Transition
Effet
[transition_none]
None
Aucune
[transition_fade]
Fade
Fondu
[theme_picker_title]
Choose Theme
Choisir un thème
---
[notification_session_active]
Session active
+24 -9
View File
@@ -305,10 +305,19 @@ Jeda setelah ronde
Kontrol sesi lanjutan
---
[double_tap_to_breathe_label]
Double tap to breathe
Ketuk dua kali untuk bernapas
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Ketuk layar dua kali untuk bernapas
---
[session_count_singular]
%d sesi
---
[session_count_plural]
%d sesi
---
[no_sessions]
Tidak ada sesi
---
[hold_display_label]
Tampilan tahan napas
@@ -738,10 +747,10 @@ Nama
Garis bawah
---
[habit_practice_list_title]
Session Data From
Data sesi dari
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Pilih sesi latihan mana yang dihitung untuk kebiasaan ini. Hari yang cocok ditandai selesai dan dapat membuka editor sesi.
---
[habit_counting_title]
Penghitungan
@@ -800,6 +809,12 @@ Total tahan
[habit_stats_best_streak]
Rangkaian terbaik
---
[habit_stats_day_singular]
%d hari
---
[habit_stats_day_plural]
%d hari
---
[bottom_nav_customize_button]
Sesuaikan navigasi bawah
---
@@ -864,20 +879,20 @@ Lihat statistik kebiasaan Anda di sini.
Navigasi
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Tab
---
[transition_label]
Transition
Transisi
[transition_none]
None
Tidak ada
[transition_fade]
Fade
Pudar
[theme_picker_title]
Choose Theme
Pilih Tema
[skip_button]
Skip
---
+25 -10
View File
@@ -359,10 +359,19 @@ Pausa dopo round
Controlli avanzati sessione
---
[double_tap_to_breathe_label]
Double tap to breathe
Doppio tap per respirare
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Tocca due volte lo schermo per respirare
---
[session_count_singular]
%d sessione
---
[session_count_plural]
%d sessioni
---
[no_sessions]
Nessuna sessione
---
[hold_display_label]
Visualizzazione trattenuta
@@ -377,7 +386,7 @@ Cerchio
Volume
---
[show_session_volume_control_label]
Mostra il controllo volume
Mostra controllo volume
---
[reset_to_defaults_label]
Ripristina predefiniti
@@ -738,10 +747,10 @@ Nome
Sottolineatura
---
[habit_practice_list_title]
Session Data From
Dati sessione da
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Scegli quali sessioni di pratica contano per questa abitudine. I giorni corrispondenti risultano completati e possono aprire l'editor della sessione.
---
[habit_counting_title]
Conteggio
@@ -800,6 +809,12 @@ Apnea totale
[habit_stats_best_streak]
Migliore serie
---
[habit_stats_day_singular]
%d giorno
---
[habit_stats_day_plural]
%d giorni
---
[bottom_nav_customize_button]
Personalizza navigazione inferiore
---
@@ -864,20 +879,20 @@ Visualizza qui le statistiche delle abitudini.
Navigazione
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Schede
---
[transition_label]
Transition
Transizione
[transition_none]
None
Nessuna
[transition_fade]
Fade
Dissolvenza
[theme_picker_title]
Choose Theme
Scegli tema
[skip_button]
Skip
---
+23 -8
View File
@@ -305,10 +305,19 @@ OK
詳細なセッション設定
---
[double_tap_to_breathe_label]
Double tap to breathe
ダブルタップで呼吸
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
画面をダブルタップして呼吸
---
[session_count_singular]
%dセッション
---
[session_count_plural]
%dセッション
---
[no_sessions]
セッションなし
---
[hold_display_label]
ホールド表示
@@ -738,10 +747,10 @@ https:// または localhost:8080 のようなループバックを使用して
下線
---
[habit_practice_list_title]
Session Data From
セッションデータ
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
この習慣に含める練習セッションを選びます。一致する日は完了として表示され、セッション編集画面を開けます。
---
[habit_counting_title]
カウント
@@ -800,6 +809,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
最長連続記録
---
[habit_stats_day_singular]
%d日
---
[habit_stats_day_plural]
%d日
---
[bottom_nav_customize_button]
下部ナビゲーションをカスタマイズ
---
@@ -871,13 +886,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
切り替え
[transition_none]
None
なし
[transition_fade]
Fade
フェード
[theme_picker_title]
Choose Theme
テーマ選択
[skip_button]
Skip
---
+23 -8
View File
@@ -359,10 +359,19 @@ Sun Salutation
고급 세션 제어
---
[double_tap_to_breathe_label]
Double tap to breathe
두 번 탭해 호흡
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
화면을 두 번 탭해 호흡
---
[session_count_singular]
%d개 세션
---
[session_count_plural]
%d개 세션
---
[no_sessions]
세션 없음
---
[hold_display_label]
홀드 표시
@@ -737,10 +746,10 @@ https:// 또는 localhost:8080 같은 루프백을 사용하세요
밑줄
---
[habit_practice_list_title]
Session Data From
세션 데이터
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
이 습관에 포함할 연습 세션을 선택하세요. 일치하는 날은 완료로 표시되며 세션 편집기를 열 수 있습니다.
---
[habit_counting_title]
횟수
@@ -799,6 +808,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
최고 연속 기록
---
[habit_stats_day_singular]
%d일
---
[habit_stats_day_plural]
%d일
---
[bottom_nav_customize_button]
하단 내비게이션 사용자화
---
@@ -870,13 +885,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
전환
[transition_none]
None
없음
[transition_fade]
Fade
페이드
[theme_picker_title]
Choose Theme
테마 선택
[skip_button]
Skip
---
+25 -10
View File
@@ -305,10 +305,19 @@ Pausa após rodada
Controles avançados da sessão
---
[double_tap_to_breathe_label]
Double tap to breathe
Toque duplo para respirar
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Toque duas vezes na tela para respirar
---
[session_count_singular]
%d sessão
---
[session_count_plural]
%d sessões
---
[no_sessions]
Sem sessões
---
[hold_display_label]
Exibicao da retencao
@@ -549,7 +558,7 @@ Oceano
Floresta
---
[theme_sunset]
Pôr do sol
Poente
---
[theme_lavender]
Lavanda
@@ -738,10 +747,10 @@ Nome
Sublinhado
---
[habit_practice_list_title]
Session Data From
Dados de sessão
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Escolha quais sessões de prática contam para este hábito. Dias correspondentes aparecem como concluídos e podem abrir o editor de sessão.
---
[habit_counting_title]
Contagem
@@ -800,6 +809,12 @@ Retenção total
[habit_stats_best_streak]
Melhor sequência
---
[habit_stats_day_singular]
%d dia
---
[habit_stats_day_plural]
%d dias
---
[bottom_nav_customize_button]
Personalizar navegação inferior
---
@@ -864,20 +879,20 @@ Veja suas estatisticas de habitos aqui.
Navegação
---
[nav_mode_dropdown]
Dropdown
Menu
---
[nav_mode_tabbar]
Abas
---
[transition_label]
Transition
Transição
[transition_none]
None
Nenhuma
[transition_fade]
Fade
Desvanecer
[theme_picker_title]
Choose Theme
Escolher tema
[skip_button]
Skip
---
+23 -8
View File
@@ -362,10 +362,19 @@ OK
Расширенное управление сессией
---
[double_tap_to_breathe_label]
Double tap to breathe
Двойное касание для вдоха
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
Коснитесь экрана дважды, чтобы вдохнуть
---
[session_count_singular]
%d сессия
---
[session_count_plural]
%d сессий
---
[no_sessions]
Нет сессий
---
[hold_display_label]
Отображение задержки
@@ -738,10 +747,10 @@ liboqs не собран для этой платформы.
Подчеркивание
---
[habit_practice_list_title]
Session Data From
Данные сессий из
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
Выберите, какие сессии практик учитываются для этой привычки. Совпадающие дни отмечаются как выполненные и могут открыть редактор сессии.
---
[habit_counting_title]
Подсчет
@@ -800,6 +809,12 @@ Choose which practice sessions count for this habit. Matching days show as compl
[habit_stats_best_streak]
Лучшая серия
---
[habit_stats_day_singular]
%d день
---
[habit_stats_day_plural]
%d дней
---
[bottom_nav_customize_button]
Настроить нижнюю навигацию
---
@@ -871,13 +886,13 @@ Choose which practice sessions count for this habit. Matching days show as compl
---
[transition_label]
Transition
Переход
[transition_none]
None
Нет
[transition_fade]
Fade
Плавно
[theme_picker_title]
Choose Theme
Выбор темы
[skip_button]
Skip
---
+23 -8
View File
@@ -305,10 +305,19 @@ Sun Salutation
高级练习控制
---
[double_tap_to_breathe_label]
Double tap to breathe
双击呼吸
---
[double_tap_to_breathe_hint]
Double tap screen to breathe
双击屏幕开始呼吸
---
[session_count_singular]
%d次会话
---
[session_count_plural]
%d次会话
---
[no_sessions]
没有会话
---
[hold_display_label]
屏息显示
@@ -736,10 +745,10 @@ liboqs 未为此目标构建。
下划线
---
[habit_practice_list_title]
Session Data From
会话数据来自
---
[habit_practice_list_info]
Choose which practice sessions count for this habit. Matching days show as completed and can open the session editor.
选择哪些练习会话计入此习惯。匹配的日期会显示为已完成,并可打开会话编辑器。
---
[habit_counting_title]
计数
@@ -798,6 +807,12 @@ Wim Hof 屏息轮次
[habit_stats_best_streak]
最佳连续记录
---
[habit_stats_day_singular]
%d天
---
[habit_stats_day_plural]
%d天
---
[bottom_nav_customize_button]
自定义底部导航
---
@@ -869,13 +884,13 @@ Wim Hof 屏息轮次
---
[transition_label]
Transition
过渡
[transition_none]
None
无
[transition_fade]
Fade
淡入淡出
[theme_picker_title]
Choose Theme
选择主题
[skip_button]
Skip
---
+2 -2
View File
@@ -3,7 +3,7 @@
#define INBE_VERSION_MAJOR 1
#define INBE_VERSION_MINOR 6
#define INBE_VERSION_PATCH 2
#define INBE_VERSION_STRING "1.6.2"
#define INBE_VERSION_PATCH 3
#define INBE_VERSION_STRING "1.6.3"
#endif
+16 -3
View File
@@ -85,6 +85,7 @@ habit_edit_info_modal(const char *title, const char *message)
FlintUIScrollArea scroll_area;
int y;
int modal_h;
int modal_w;
int paragraph_h;
int button_w = flint_px(112);
int button_h = flint_px(36);
@@ -93,19 +94,31 @@ habit_edit_info_modal(const char *title, const char *message)
int hover = 0;
int result = 0;
modal_w = view_width - flint_px(36);
if(modal_w > flint_px(420))
modal_w = flint_px(420);
if(modal_w < flint_px(320))
modal_w = flint_px(320);
if(modal_w > view_width - flint_px(24))
modal_w = view_width - flint_px(24);
if(modal_w < flint_px(240))
modal_w = flint_px(240);
paragraph = (FlintUIParagraph){
.text = message,
.width = flint_px(320) - flint_px(36)
.width = modal_w - flint_px(36),
.font = flint_ui_font(),
.line_gap = flint_px(4)
};
modal_h = ui_paragraph_modal_height((FlintUIParagraphModalMeasure){
.message = message,
.width = flint_px(320),
.width = modal_w,
.button_h = button_h,
.extra_lines = 2,
.min_height = flint_px(196)
});
frame = ui_draw_modal_frame(flint_px(320), modal_h, title,
frame = ui_draw_modal_frame(modal_w, modal_h, title,
(Texture2D){0}, (Texture2D){0});
paragraph.width = frame.content_w;
paragraph_h = flint_ui_paragraph_height(paragraph);
+4 -2
View File
@@ -239,7 +239,8 @@ draw_habit_session_edit_content(InbeApp *app, HabitLinkedContext *ctx, int conte
if(ctx->count <= 0) {
if(draw)
flint_text_draw("No sessions", content_x, y, flint_ui_font(), flint_theme_get_text());
flint_text_draw(locale_get("no_sessions"), content_x, y,
flint_ui_font(), flint_theme_get_text());
return y + row_h;
}
@@ -277,7 +278,8 @@ draw_habit_session_edit_content(InbeApp *app, HabitLinkedContext *ctx, int conte
snprintf(time_text, sizeof(time_text), "%02d:%02d",
ctx->entries[i].hour, ctx->entries[i].minute);
if(activity == EXERCISE_SUN_SALUTATION)
snprintf(summary_text, sizeof(summary_text), "1 session");
locale_format(summary_text, sizeof(summary_text),
"session_count_singular", 1);
else if(activity == EXERCISE_MEDITATION)
habit_format_duration(ctx->entries[i].total_seconds,
summary_text, sizeof(summary_text));
+30 -2
View File
@@ -1246,11 +1246,36 @@ habit_weekly_draw_text_line(const char *text, int x, int y, int w, int h,
int text_size, Color color)
{
int font_size;
const char *draw_text = text;
char fitted[128];
if(text == NULL || text[0] == '\0' || w <= 0 || h <= 0)
return;
font_size = text_size;
flint_text_draw(text, x, flint_text_y(text, y, h, font_size), font_size, color);
while(font_size > FLINT_TEXT_8 && flint_text_measure(text, font_size) > w)
font_size -= flint_px(1);
if(flint_text_measure(text, font_size) > w) {
snprintf(fitted, sizeof(fitted), "%s", text);
while(fitted[0] != '\0' && flint_text_measure(fitted, font_size) > w) {
size_t len = strlen(fitted);
size_t cut = len;
if(len <= 3)
break;
if(len > 3 && strcmp(fitted + len - 3, "...") == 0)
len -= 3;
cut = len;
do {
cut--;
} while(cut > 0 && (((unsigned char)fitted[cut] & 0xC0) == 0x80));
fitted[cut] = '\0';
if(cut + 3 < sizeof(fitted))
strncat(fitted, "...", sizeof(fitted) - strlen(fitted) - 1);
}
draw_text = fitted;
}
flint_text_draw(draw_text, x + (w - flint_text_measure(draw_text, font_size)) / 2,
flint_text_y(draw_text, y, h, font_size), font_size, color);
}
static int
@@ -1290,7 +1315,10 @@ habit_weekly_summary(const HabitLinkedContext *ctx, int day_index,
mixed ? "Mixed practice" : practice_activity_label(first_activity));
}
if(secondary != NULL && secondary_size > 0)
snprintf(secondary, secondary_size, "%d session%s", count, count == 1 ? "" : "s");
locale_format(secondary, secondary_size,
count == 1 ? "session_count_singular"
: "session_count_plural",
count);
return count;
}
+34 -3
View File
@@ -143,6 +143,10 @@ settings_screen_draw_theme_picker_modal(InbeApp *app)
int modal_h = flint_px(360);
const char *title = locale_get("theme_picker_title");
FlintUIPanelFrame frame;
FlintUIScrollArea scroll_area;
FlintUIScrollView scroll_view;
int picker_h;
int draw_w;
frame = ui_draw_modal_frame(modal_w, modal_h, title,
(Texture2D){0},
@@ -153,13 +157,40 @@ settings_screen_draw_theme_picker_modal(InbeApp *app)
return;
}
// Draw theme picker in modal content area
if(ui_draw_theme_picker(frame.content_x, frame.content_y,
frame.content_w, app->dark_mode, &app->theme_id)) {
draw_w = frame.content_w;
picker_h = ui_theme_picker_height(draw_w);
scroll_area = (FlintUIScrollArea){
.bounds = {
(float)frame.content_x,
(float)frame.content_y,
(float)frame.content_w,
(float)frame.content_h
},
.content_height = picker_h,
.content_x = frame.content_x,
.content_width = frame.content_w,
.scroll_offset = &app->theme_state.theme_picker_scroll,
.wheel_step = flint_px(42),
.scrollbar_x = frame.content_x + frame.content_w - flint_px(8)
};
for(int i = 0; i < 3; i++) {
FlintUIScrollView measured = ui_scroll_container_measure(scroll_area);
if(measured.content_w == draw_w)
break;
draw_w = measured.content_w;
scroll_area.content_height = ui_theme_picker_height(draw_w);
}
picker_h = ui_theme_picker_height(draw_w);
scroll_area.content_height = picker_h;
scroll_view = ui_scroll_container_begin(scroll_area);
if(ui_draw_theme_picker(scroll_view.content_x, scroll_view.content_y,
scroll_view.content_w, app->dark_mode, &app->theme_id)) {
app->theme_id = clampi(app->theme_id, 0, FLINT_THEME_COUNT - 1);
app_refresh_theme(app);
app->settings_dirty = 1;
save_settings(app);
app_close_modal(app);
}
ui_scroll_container_end(scroll_area, scroll_view);
}
+1
View File
@@ -8,6 +8,7 @@ typedef struct SettingsThemeState {
int draw_nav_mode_menu;
int draw_transition_menu;
int theme_picker_modal_open;
int theme_picker_scroll;
} SettingsThemeState;
int settings_theme_content_height(int content_w);
+32 -13
View File
@@ -4,6 +4,7 @@
#include "habits/habits.h"
#include "flint_locale.h"
#include "flint_theme.h"
#include "flint_ui.h"
extern int view_width;
extern int view_height;
@@ -62,10 +63,30 @@ statistics_draw_metric(int x, int y, int w, int h, const char *label,
value_font, flint_theme_get_text());
}
static void
statistics_draw_section_title(const char *title, int x, int y)
static int
statistics_draw_section_title(const char *title, int x, int y, int w)
{
flint_text_draw(title, x, y, FLINT_TEXT_16, flint_theme_get_text());
FlintUIParagraph paragraph = {
.text = title,
.width = w,
.font = FLINT_TEXT_16,
.line_gap = flint_px(3),
.color = flint_theme_get_text()
};
int title_y = y;
int height = flint_ui_paragraph_height(paragraph);
flint_ui_paragraph_draw(paragraph, x, &title_y);
return height;
}
static void
statistics_format_day_count(char *out, size_t out_size, int count)
{
locale_format(out, out_size,
count == 1 ? "habit_stats_day_singular"
: "habit_stats_day_plural",
count);
}
static int
@@ -330,8 +351,7 @@ statistics_draw_view(InbeApp *app, InbeHabit *active,
}
metric_w = (content_w - metrics_gap) / 2;
snprintf(value, sizeof(value), "%d day%s", current_streak,
current_streak == 1 ? "" : "s");
statistics_format_day_count(value, sizeof(value), current_streak);
statistics_draw_metric(content_x, y, metric_w, metric_h,
locale_get("habit_stats_current_streak"), value, active->color);
snprintf(value, sizeof(value), "%d/%d", last_30_done, last_30_total);
@@ -341,16 +361,16 @@ statistics_draw_view(InbeApp *app, InbeHabit *active,
y += metric_h + flint_px(22);
if(has_wim_hof_rounds) {
statistics_draw_section_title(locale_get("habit_stats_wim_hof_hold_rounds"), content_x, y);
y += flint_px(28);
y += statistics_draw_section_title(locale_get("habit_stats_wim_hof_hold_rounds"),
content_x, y, content_w) + flint_px(10);
statistics_draw_hold_graph(app, linked_ctx, content_x, y, content_w,
&today_tm, EXERCISE_WIM_HOF,
active->color);
y += flint_px(194);
}
statistics_draw_section_title(locale_get("habit_stats_weekday_pattern"), content_x, y);
y += flint_px(28);
y += statistics_draw_section_title(locale_get("habit_stats_weekday_pattern"),
content_x, y, content_w) + flint_px(10);
DrawRectangle(content_x, y, content_w, chart_h, flint_darken(flint_theme_get_bg(), 7));
{
const char *labels[7] = {"S", "M", "T", "W", "T", "F", "S"};
@@ -378,8 +398,8 @@ statistics_draw_view(InbeApp *app, InbeHabit *active,
if(linked_ctx != NULL && linked_ctx->count > 0) {
char best[32];
char total[32];
statistics_draw_section_title(locale_get("habit_stats_practice_time"), content_x, y);
y += flint_px(28);
y += statistics_draw_section_title(locale_get("habit_stats_practice_time"),
content_x, y, content_w) + flint_px(10);
habit_format_duration(linked_ctx->best_seconds, best, sizeof(best));
habit_format_duration(linked_ctx->total_seconds, total, sizeof(total));
statistics_draw_metric(content_x, y, metric_w, metric_h,
@@ -388,8 +408,7 @@ statistics_draw_view(InbeApp *app, InbeHabit *active,
content_w - metric_w - metrics_gap, metric_h,
locale_get("habit_stats_total_hold"), total, flint_lighten(active->color, 20));
} else {
snprintf(value, sizeof(value), "%d day%s", best_streak,
best_streak == 1 ? "" : "s");
statistics_format_day_count(value, sizeof(value), best_streak);
statistics_draw_metric(content_x, y, content_w, metric_h,
locale_get("habit_stats_best_streak"), value, active->color);
}
+4 -4
View File
@@ -3,8 +3,8 @@
IDI_APP_ICON ICON "inbe.ico"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,6,2,0
PRODUCTVERSION 1,6,2,0
FILEVERSION 1,6,3,0
PRODUCTVERSION 1,6,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -21,11 +21,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "waozi"
VALUE "FileDescription", "Inner Breeze"
VALUE "FileVersion", "1.6.2"
VALUE "FileVersion", "1.6.3"
VALUE "InternalName", "inbe"
VALUE "OriginalFilename", "inbe-windows-x86_64.exe"
VALUE "ProductName", "Inner Breeze"
VALUE "ProductVersion", "1.6.2"
VALUE "ProductVersion", "1.6.3"
END
END
BLOCK "VarFileInfo"