Use a compact stroke pen symbol in habit choices

This commit is contained in:
waozi committed 2026-10-26 23:46:39 -03:00
1 parent ee47be692b
commit bdf5fcee7a
2 files changed
+4 -12

No files matched your search

+3 -11
View File
@@ -29,14 +29,6 @@ HABIT_ICON_RUN :: 10
// The symbol a habit linked to Diary shows until it has its own.
HABIT_ICON_QUILL_PEN :: 26
HabitPenShape :: #string HABIT_PEN_END
F:M3.92896 20.0712L2.96546 19.8035C2.86893 20.1509 2.96689 20.5234 3.22185 20.7783C3.47681 21.0333 3.84928 21.1312 4.19668 21.0347L3.92896 20.0712ZM10.2929 18.657L10.4132 19.6497V19.6497L10.2929 18.657ZM5.34317 13.7073L6.3359 13.8276V13.8276L5.34317 13.7073ZM19.4856 8.75736C19.8761 9.14789 20.5092 9.14789 20.8998 8.75736C21.2903 8.36684 21.2903 7.73368 20.8998 7.34315L20.1927 8.05026L19.4856 8.75736ZM16.6571 3.10051C16.2666 2.70999 15.6334 2.70999 15.2429 3.10051C14.8524 3.49103 14.8524 4.1242 15.2429 4.51472L15.95 3.80762L16.6571 3.10051ZM6.59652 7.8319L6.22513 6.90342L6.59652 7.8319ZM13.5876 5.68823L14.2947 4.98113L13.5876 5.68823ZM18.5333 11.4911L19.4618 11.8625L18.5333 11.4911ZM18.3119 10.4126L19.019 9.70546L18.3119 10.4126ZM16.1683 17.4037L15.2398 17.0323L16.1683 17.4037ZM15.3665 18.024L15.2407 17.0319L15.3665 18.024ZM16.1683 17.4037L17.0967 17.775L19.4618 11.8625L18.5333 11.4911L17.6048 11.1197L15.2398 17.0323L16.1683 17.4037ZM18.3119 10.4126L19.019 9.70546L14.2947 4.98113
L13.5876 5.68823L12.8805 6.39534L17.6048 11.1197L18.3119 10.4126ZM12.5091 5.46686L12.1377 4.53839L6.22513 6.90342L6.59652 7.8319L6.96791 8.76038L12.8805 6.39534L12.5091 5.46686ZM3.92896 20.0712C4.19668 21.0347 4.19666 21.0347 4.19665 21.0347C4.19667 21.0347 4.19668 21.0347 4.19672 21.0347C4.19679 21.0347 4.19693 21.0346 4.19713 21.0346C4.19752 21.0345 4.19817 21.0343 4.19905 21.034C4.20083 21.0336 4.20358 21.0328 4.20729 21.0318C4.2147 21.0297 4.22593 21.0266 4.24079 21.0225C4.27051 21.0144 4.31476 21.0022 4.3721 20.9866C4.48678 20.9555 4.65371 20.9104 4.86131 20.8555C5.27676 20.7455 5.85386 20.5961 6.5003 20.4384C7.80789 20.1192 9.34774 19.7789 10.4132 19.6497L10.2929 18.657L10.1726 17.6643C8.97751 17.8091 7.33538 18.1759 6.02614 18.4954C5.36415 18.6569 4.77413 18.8097 4.34955 18.9221C4.13714 18.9783 3.96583 19.0245 3.84728 19.0567C3.788 19.0728 3.74188 19.0855 3.71039 19.0941C3.69465 19.0985 3.68256 19.1018 3.6743 19.1041C3.67018 19.1052 3.66701 19.1061 3.66482 19.1067
C3.66373 19.107 3.66288 19.1073 3.66228 19.1074C3.66198 19.1075 3.66174 19.1076 3.66157 19.1076C3.66148 19.1076 3.6614 19.1077 3.66135 19.1077C3.66128 19.1077 3.66123 19.1077 3.92896 20.0712ZM10.2929 18.657L10.4132 19.6497C12.0572 19.4505 14.4119 19.153 15.4923 19.016L15.3665 18.024L15.2407 17.0319C14.16 17.169 11.8104 17.4657 10.1726 17.6643L10.2929 18.657ZM5.97618 8.63367L4.98413 8.50788C4.84713 9.58825 4.5497 11.943 4.35043 13.5869L5.34317 13.7073L6.3359 13.8276C6.53442 12.1898 6.8312 9.84018 6.96824 8.75947L5.97618 8.63367ZM5.34317 13.7073L4.35043 13.5869C4.22128 14.6524 3.88092 16.1923 3.56182 17.4999C3.40406 18.1463 3.25465 18.7234 3.14469 19.1389C3.08973 19.3465 3.04471 19.5134 3.01353 19.6281C2.99794 19.6854 2.98581 19.7297 2.97763 19.7594C2.97355 19.7742 2.97045 19.7855 2.9684 19.7929C2.96737 19.7966 2.96661 19.7993 2.96612 19.8011C2.96587 19.802 2.96569 19.8026 2.96558 19.803C2.96553 19.8032 2.96549 19.8034 2.96547 19.8035C2.96546 19.8035 2.96546 19.8035 2.96545 19.8035
C2.96545 19.8035 2.96546 19.8035 3.92896 20.0712C4.89245 20.3389 4.89247 20.3389 4.89248 20.3388C4.8925 20.3388 4.89252 20.3387 4.89254 20.3386C4.89259 20.3384 4.89266 20.3382 4.89274 20.3379C4.89291 20.3373 4.89314 20.3364 4.89345 20.3353C4.89405 20.3332 4.89493 20.33 4.89607 20.3259C4.89835 20.3176 4.90169 20.3055 4.90602 20.2898C4.91468 20.2583 4.92732 20.2122 4.94344 20.1529C4.97568 20.0343 5.02188 19.863 5.0781 19.6506C5.19049 19.226 5.34325 18.636 5.5048 17.974C5.8243 16.6648 6.19104 15.0227 6.3359 13.8276L5.34317 13.7073ZM4.63627 19.364L5.34337 20.0711L11 14.4145L10.2929 13.7074L9.58583 13.0003L3.92917 18.6569L4.63627 19.364ZM10.2929 12.2932L11 13.0003H11L11.7071 12.2932L12.4143 11.5861C11.6332 10.805 10.3669 10.805 9.58583 11.5861L10.2929 12.2932ZM11.7071 12.2932L11 13.0003V13.0003L11.7071 13.7074L12.4143 14.4145C13.1953 13.6335 13.1953 12.3671 12.4143 11.5861L11.7071 12.2932ZM11.7071 13.7074L11 13.0003H11L10.2929 13.7074L9.58583 14.4145
C10.3669 15.1956 11.6332 15.1956 12.4143 14.4145L11.7071 13.7074ZM10.2929 13.7074L11 13.0003V13.0003L10.2929 12.2932L9.58583 11.5861C8.80478 12.3671 8.80478 13.6335 9.58583 14.4145L10.2929 13.7074ZM20.1927 8.05026L20.8998 7.34315L16.6571 3.10051L15.95 3.80762L15.2429 4.51472L19.4856 8.75736L20.1927 8.05026ZM6.59652 7.8319L6.22513 6.90342C5.55123 7.17298 5.07559 7.78655 4.98413 8.50788L5.97618 8.63367L6.96824 8.75947L6.96791 8.76038L6.59652 7.8319ZM13.5876 5.68823L14.2947 4.98113C13.729 4.4154 12.8806 4.24125 12.1377 4.53839L12.5091 5.46686L12.8805 6.39534V6.39534L13.5876 5.68823ZM18.5333 11.4911L19.4618 11.8625C19.7589 11.1196 19.5848 10.2712 19.019 9.70546L18.3119 10.4126L17.6048 11.1197V11.1197L18.5333 11.4911ZM16.1683 17.4037L15.2398 17.0323L15.2407 17.0319L15.3665 18.024L15.4923 19.016C16.2136 18.9246 16.8272 18.4489 17.0967 17.775L16.1683 17.4037Z
HABIT_PEN_END;
// The drawing of icon 1 to HABIT_ICON_COUNT, or "" for any other number.
HabitIconShape :: (icon: s32) -> string {
if icon == 1 {
@@ -353,8 +345,8 @@ HabitIconShape :: (icon: s32) -> string {
return "S2rm:M9 20.8799V3M6 21H17C18.1046 21 19 20.1046 19 19V5C19 3.89543 18.1046 3 17 3H6C5.44772 3 5 3.44772 5 4V20C5 20.5523 5.44772 21 6 21Z"
}
if icon == HABIT_ICON_PEN {
// MingCute regular pen (Apache-2.0).
return HabitPenShape
// MingCute regular pen_2 (Apache-2.0).
return "S2rr:M6.34312 14.8284L9.17155 17.6569M15.5356 5.63604L19.7783 9.87868C20.1688 10.2692 20.1688 10.9024 19.7783 11.2929L15.5356 15.5355M4.92903 16.2426L16.9498 4.22183C17.7309 3.44078 18.9972 3.44078 19.7783 4.22183C20.5593 5.00288 20.5593 6.26921 19.7783 7.05026L7.75746 19.0711L4.22192 19.7782L4.92903 16.2426Z"
}
if icon == HABIT_ICON_PENCIL {
// MingCute regular pencil (Apache-2.0).
@@ -617,7 +609,7 @@ HabitIconName :: (icon: s32) -> string {
return "notebook"
}
if icon == HABIT_ICON_PEN {
return "pen"
return "pen_2"
}
if icon == HABIT_ICON_PENCIL {
return "pencil"
+1 -1
View File
@@ -1164,7 +1164,7 @@ test_habit_writing_icons :: () {
habits_a = Habits.{}
check_true("new writing habit", habits_add_custom(*habits_a, "Write", Blue(),
HABIT_SYNC_NONE, 0) >= 0)
names: [8]string = .["diary", "notebook", "pen", "pencil", "edit_2", "document_2", "keyboard", "bulb"]
names: [8]string = .["diary", "notebook", "pen_2", "pencil", "edit_2", "document_2", "keyboard", "bulb"]
for index: cast(s32)0..7 {
icon := 77 + index
check_true("writing symbol has its stable name and drawing",