Improve profile header typography and flower avatar detail

This commit is contained in:
waozi committed 2026-10-06 00:14:23 -03:00
1 parent f1d3713815
commit b99eb523bd
10 files changed
+132 -28

No files matched your search

+1
View File
@@ -391,6 +391,7 @@ STYLE_FILES := $(wildcard $(KSS_DIR)/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)
IMAGE_FILES += $(wildcard assets/profile-pictures/*.png)
IMAGE_FILES += $(KRYON_DIR)/icons/ui.png $(KRYON_DIR)/icons/pfp.png
SUBAPP_BUNDLES := $(addprefix $(BUILD_DIR)/subapps/,lists.zib habits.zib practice.zib)
INBE_BUNDLE := $(BUILD_DIR)/inbe.zib
+6
View File
@@ -0,0 +1,6 @@
{
"generator": "built-in image_gen",
"source": "Existing flower1 profile picture, persisted icon ID 50",
"purpose": "Sharper profile picture for larger sizes and display scaling",
"prompt": "Edit target: the attached Inner Breeze profile-card screenshot. Produce ONLY a high-resolution transparent PNG of the same flower bouquet shown inside the circular profile picture. Remove all UI, text, circular border, card background and shadows outside the bouquet. Preserve the bouquet's recognizable composition: tall deep-purple lupine/flower spike in the upper right, yellow sunflower high on the left, smaller central white daisies with golden centers, pink coneflower blossoms on the right, vivid green foliage below, and small yellow blossoms near the lower left. Faithfully refine this existing floral avatar into crisp detailed softly shaded 2D botanical illustration, with smooth clean contours, readable petals and stems at icon size. Keep the same palette, proportions, floral species and arrangement; don't add a vase, pot, ribbon or other objects. This is an asset for a profile picture in a native app, viewed about 50–140 pixels wide; simplify microscopic clutter enough to remain clear at small size. Square canvas, bouquet fully visible and centered, fills about 82% of the square with an even transparent margin, no lettering, no badge, no circular backdrop. Output image resolution at least 1024x1024."
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

+37
View File
@@ -46,3 +46,40 @@ Button.practice-start {
font-size: 20;
radius: 14;
}
Button.profile-header {
background: surface;
background-end: surface;
border: border-soft;
border-width: 1;
radius: 16;
}
Button.profile-header:hover {
background: panel-hover;
background-end: panel-hover;
border: border-hover;
}
Button.profile-header:pressed {
background: panel-pressed;
background-end: panel-pressed;
}
Button.profile-header:selected {
border: focus;
border-width: 2;
}
Button.profile-header:focus {
border: focus;
border-width: 2;
}
Text.profile-name {
foreground: text;
}
Text.profile-username {
foreground: muted;
}
+2
View File
@@ -193,6 +193,7 @@ add_dependencies(app_ziran_generated app_build_laws app_clean_runtime_api app_zi
file(GLOB APP_LOCALE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/locales/*.txt")
file(GLOB APP_SOUND_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/sounds/*.ogg")
file(GLOB APP_SOCIAL_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/social/*.png")
file(GLOB APP_PROFILE_PICTURE_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS "${REPO_ROOT}/assets/profile-pictures/*.png")
# banner.png is the web/store copy of banner-light.png; the app loads only
# the themed pair.
file(GLOB APP_PRACTICE_BANNER_ASSETS RELATIVE "${REPO_ROOT}" CONFIGURE_DEPENDS
@@ -246,6 +247,7 @@ set(APP_EMBEDDED_INPUTS
build/packages/kryon/icons/pfp.png
${APP_PRACTICE_BANNER_ASSETS}
${APP_SOCIAL_ASSETS}
${APP_PROFILE_PICTURE_ASSETS}
${APP_SUN_SALUTATION_FRAMES}
assets/fonts/subset/NotoSans-App-Regular.ttf
assets/fonts/subset/NotoSansSC-App-Regular.otf
+11 -4
View File
@@ -19,6 +19,7 @@
using ButtonTone;
using ButtonEmphasis;
using ImageFit;
ProfileImagePickerProps :: struct {
title: string
@@ -39,6 +40,13 @@ ProfileImagePickerResult :: struct {
ProfilePictureImage :: (icon_type: s32, label: string) -> ImageProps {
image: ImageProps
image.alt_text = label
if icon_type == 50 {
// The profile card needs more detail than the 64-pixel icon atlas.
image.asset_path = "assets/profile-pictures/flowers.png"
image.fit = cast(ImageFit)ImageFitContain
return image
}
index := icon_type - 41
if icon_type >= 124 && icon_type <= 126 {
index = 25 + icon_type - 124
@@ -47,10 +55,9 @@ ProfilePictureImage :: (icon_type: s32, label: string) -> ImageProps {
index = 0
}
image.asset_path = "icons/pfp.png"
image.alt_text = label
image.source = Rectangle.{cast(float32)((index % 5) * 64),
cast(float32)((index / 5) * 64), 64.0, 64.0
}
}
return image
}
@@ -144,7 +151,7 @@ ProfileImagePicker :: (session: Session,
button.id = cast(s32)7800 + index
button.bounds = Rectangle.{cast(float32)x, cast(float32)y,
cast(float32)cell, cast(float32)cell
}
}
button.label = props.title
button.selected = props.selected_icon_type == icon_type
button.tone = cast(ButtonTone)ButtonToneNeutral
@@ -162,7 +169,7 @@ ProfileImagePicker :: (session: Session,
picture.bounds = Rectangle.{cast(float32)(x + inset),
cast(float32)(y + inset), cast(float32)(cell - inset * 2),
cast(float32)(cell - inset * 2)
}
}
Image(session, picture)
index += 1
}
+18 -2
View File
@@ -391,14 +391,30 @@ setup_screenshot_scene :: (app: *InnerBreeze, request: *ScreenshotRequest) {
app.main_tab = APP_MAIN_TAB_PRACTICE
app.breathing.screen = ScreenStart
app.navigation_placement = NAVIGATION_LEFT
if AppTextFromCString(*request.scene[0], 64) == "navigation_right" {
if scene_text == "navigation_right" || scene_text == "navigation_profile_right" {
app.navigation_placement = NAVIGATION_RIGHT
} else if AppTextFromCString(*request.scene[0], 64) == "navigation_top" {
app.navigation_placement = NAVIGATION_TOP
} else if AppTextFromCString(*request.scene[0], 64) == "navigation_bottom" {
app.navigation_placement = NAVIGATION_BOTTOM
}
app.nav_rail_collapsed = ifx AppTextFromCString(*request.scene[0], 64) == "navigation_collapsed" then 1 else 0
app.nav_rail_collapsed = ifx scene_text == "navigation_collapsed" || scene_text == "navigation_profile_collapsed" then 1 else 0
if scene_text.count >= 18 && scene_text[:18] == "navigation_profile" {
// Profile previews stay inside the screenshot store and offline.
account: SyncAccount = .{}
if sync_account_generate(*account) != 0 {
unused sync_account_save(*account,
cast(SyncAccountLocalDataChoice)SYNC_ACCOUNT_LOCAL_DATA_ASK)
}
storage_set_sync_enabled(0)
app.profile_picture_icon = 50
AppCopyText("Waozi", app.profile_display_name[:])
storage_set_setting_text("sync_account_alias", "waozi")
if scene_text == "navigation_profile_long" {
AppCopyText("Ágatha Müller", app.profile_display_name[:])
storage_set_setting_text("sync_account_alias", "agatha.muller")
}
}
} else if AppTextFromCString(*request.scene[0], 64) == "wim_hof_session" {
app.main_tab = APP_MAIN_TAB_PRACTICE
app.exercise_type = EXERCISE_WIM_HOF
+6 -5
View File
@@ -4,6 +4,7 @@ c3 :: #system_library "c";
#import, file "../habits/habit_model.zi";
#import, file "../habits/habit_calendar.zi";
#import, file "../app/app_types.zi";
#import, file "../app/profile_image_picker.zi";
#import, file "../app/route_types.zi";
#import "layout"
#import "geometry"
@@ -200,11 +201,11 @@ profile_draw_avatar :: (app: *InnerBreeze,
app_open_modal(app, cast(ModalType)ModalProfilePicturePicker)
}
inset := AppScale(1)
picture := ImageForIcon(app.profile_picture_icon,
Rectangle.{cast(float32)(x + inset),
cast(float32)(y + inset),
cast(float32)(size - inset * 2),
cast(float32)(size - inset * 2)}, label)
picture := ProfilePictureImage(app.profile_picture_icon, label)
picture.bounds = Rectangle.{cast(float32)(x + inset),
cast(float32)(y + inset),
cast(float32)(size - inset * 2),
cast(float32)(size - inset * 2)}
Image(app.ui.session, picture)
}
+40 -16
View File
@@ -11,6 +11,8 @@
#import "paint_queue"
#import "session"
#import "style"
#import "kss_parser"
#import "text_align"
#import "text_props"
#import "text_widget"
#import, file "../app/app_nav_state.zi";
@@ -31,6 +33,7 @@ using ButtonTone;
using ModalType;
using NavigationPlacement;
using TextWrap;
using TextAlign;
DesktopRailLayout :: struct {
x: s32
@@ -174,20 +177,20 @@ desktop_rail_profile_button :: (app: *InnerBreeze,
AppTextFromCString(*subtitle_bytes[0], 96))
margin := AppScale(16)
y := AppScale(16)
height := AppScale(76)
height := AppScale(88)
button: ButtonProps
button.id = 6690
button.bounds = Rectangle.{cast(float32)(layout.x + margin),
cast(float32)y, cast(float32)(layout.width - margin * 2),
cast(float32)height
}
button.icon_only = app.nav_rail_collapsed != 0
// The separately measured name and username form the button's content.
button.class_name = KssClassId(KssMakeName("profile-header"))
button.tone = cast(ButtonTone)ButtonToneNeutral
if app.breathing.screen == ScreenProfile {
button.tone = cast(ButtonTone)ButtonToneAccent
}
button.emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost
button.invisible = true
button.selected = app.breathing.screen == ScreenProfile
button.disabled = app.modal.active != 0 || app.blocked_input_frame == app.breathing.frame
clicked := Button(app.ui.session, button) != 0
@@ -199,9 +202,10 @@ desktop_rail_profile_button :: (app: *InnerBreeze,
}
avatar_y := y + (height - avatar_size) / 2
avatar_background := LightenColor(StyleTokenColor("accent"), 30)
DrawCircle(avatar_x + avatar_size / 2,
avatar_y + avatar_size / 2, cast(float32)(avatar_size / 2),
avatar_background)
PaintRoundedFill(app.ui.session, -1,
Rectangle.{cast(float32)avatar_x, cast(float32)avatar_y,
cast(float32)avatar_size, cast(float32)avatar_size},
cast(float32)(avatar_size / 2), 24, avatar_background)
avatar_image := ProfilePictureImage(app.profile_picture_icon, label)
avatar_image.bounds = Rectangle.{cast(float32)avatar_x,
cast(float32)avatar_y, cast(float32)avatar_size,
@@ -214,24 +218,44 @@ desktop_rail_profile_button :: (app: *InnerBreeze,
text_width := layout.x + layout.width - margin - AppScale(12) - text_x
label_props: TextProps
label_props.text = label
label_props.font = AppScale(Text14)
label_props.font = AppFitFontSize(label, text_width - AppScale(4),
AppScale(Text20), AppScale(Text14))
label_props.class_name = KssClassId(KssMakeName("profile-name"))
label_props.bounds = Rectangle.{cast(float32)text_x,
cast(float32)(y + AppScale(16)), cast(float32)text_width,
cast(float32)AppScale(18)
0.0, cast(float32)text_width, 0.0
}
label_props.wrap = cast(TextWrap)TextWrapNone
Text(app.ui.session, label_props)
label_props.vertical_align = cast(TextAlign)TextAlignCenter
label_plan := PrepareText(label_props,
TextFaceFor(label_props, DefaultTextFace()))
label_props.bounds.height = label_plan.bounds.height + cast(float32)AppScale(6)
text_props: TextProps
text_props.text = subtitle
text_props.font = AppScale(Text12)
text_props.font = AppFitFontSize(subtitle, text_width - AppScale(4),
AppScale(Text14), AppScale(Text12))
text_props.class_name = KssClassId(KssMakeName("profile-username"))
text_props.bounds = Rectangle.{
cast(float32)text_x,
cast(float32)(y + AppScale(40)),
cast(float32)text_width,
cast(float32)AppScale(16)
cast(float32)text_x, 0.0, cast(float32)text_width, 0.0
}
text_props.wrap = cast(TextWrap)TextWrapNone
Text(app.ui.session, text_props)
text_props.vertical_align = cast(TextAlign)TextAlignCenter
text_h: float32 = 0.0
gap: float32 = 0.0
if subtitle.count > 0 {
text_plan := PrepareText(text_props,
TextFaceFor(text_props, DefaultTextFace()))
text_h = text_plan.bounds.height + cast(float32)AppScale(6)
gap = cast(float32)AppScale(2)
}
text_y := cast(float32)y +
(cast(float32)height - label_props.bounds.height - gap - text_h) * 0.5f
label_props.bounds.y = text_y
Text(app.ui.session, label_props)
if subtitle.count > 0 {
text_props.bounds.y = text_y + label_props.bounds.height + gap
text_props.bounds.height = text_h
Text(app.ui.session, text_props)
}
}
if clicked {
app_apply_nav_route(app, APP_NAV_ROUTE_PROFILE)
+11 -1
View File
@@ -18,6 +18,7 @@ for name in ("WAYLAND_DISPLAY", "GDK_DISPLAY"):
env.pop(name, None)
env["APP_NO_TRAY"] = "1"
env["APP_SHOT_WINDOW"] = "1"
env["INBE_DEBUG_ROUTE"] = "1"
def command(*args):
@@ -63,6 +64,15 @@ with log_path.open("w") as log:
time.sleep(0.5)
before = capture(window, "home")
assert before.size == (900, 720), before.size
# The name side of the profile card is part of the click target.
# icon_only would silently shrink this wide card to a square.
command("xdotool", "mousemove", "--window", window, "160", "60")
command("xdotool", "mousedown", "1")
time.sleep(0.1)
command("xdotool", "mouseup", "1")
time.sleep(0.5)
assert "screen=0->10" in log_path.read_text(), "profile name did not open Profile"
before = capture(window, "profile")
for name, y in (("lists", 145), ("habits", 210),
("practice", 275), ("settings", 670)):
prior = before.getpixel((20, y))
@@ -94,4 +104,4 @@ with log_path.open("w") as log:
app.kill()
app.wait(timeout=2)
print("Native navigation: lists, habits, practice and settings clicks passed")
print("Native navigation: profile name, lists, habits, practice and settings clicks passed")