From b0259b7a49010886cdaeac317d13f0e79bbc8cf1 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Fri, 28 Jun 2024 09:47:55 -0700 Subject: [PATCH] visual cleanup / fixes --- src/df/gfx/df_gfx.c | 3 ++- src/df/gfx/df_views.c | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 864bb02c..c195a9c7 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -4831,6 +4831,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_Focus(UI_FocusKind_On) UI_Squish(0.25f-0.25f*ws->autocomp_open_t) UI_Transparency(1.f-ws->autocomp_open_t) + DF_Palette(DF_PaletteCode_Floating) { autocomp_box = ui_build_box_from_stringf(UI_BoxFlag_DefaultFocusNavY| UI_BoxFlag_Clickable| @@ -4861,7 +4862,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) { DF_AutoCompListerItem *item = &item_array.v[idx]; UI_Box *item_box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawHotEffects|UI_BoxFlag_DrawActiveEffects|UI_BoxFlag_MouseClickable, "autocomp_%I64x", idx); - UI_Parent(item_box) + UI_Parent(item_box) UI_Padding(ui_em(1.f, 1.f)) { UI_WidthFill { diff --git a/src/df/gfx/df_views.c b/src/df/gfx/df_views.c index 572d2c3b..4b9773a8 100644 --- a/src/df/gfx/df_views.c +++ b/src/df/gfx/df_views.c @@ -8566,7 +8566,7 @@ DF_VIEW_UI_FUNCTION_DEF(Settings) items_list.count += 1; n->v.kind = DF_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Theme Presets"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_Setting] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; + n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_ThemePreset] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; n->v.category = DF_SettingsItemKind_ThemePreset; } @@ -8604,7 +8604,7 @@ DF_VIEW_UI_FUNCTION_DEF(Settings) items_list.count += 1; n->v.kind = DF_SettingsItemKind_CategoryHeader; n->v.string = str8_lit("Theme Colors"); - n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_Setting] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; + n->v.icon_kind = sv->category_opened[DF_SettingsItemKind_ThemeColor] ? DF_IconKind_DownCaret : DF_IconKind_RightCaret; n->v.category = DF_SettingsItemKind_ThemeColor; } @@ -8956,9 +8956,7 @@ DF_VIEW_UI_FUNCTION_DEF(Settings) } if(is_slider) UI_PrefWidth(ui_text_dim(10, 1)) { - UI_Font(df_font_from_slot(DF_FontSlot_Code)) - UI_RunFlags(F_RunFlag_Smooth) - UI_Flags(UI_BoxFlag_DrawTextWeak) + UI_Flags(UI_BoxFlag_DrawTextWeak) ui_labelf("(%i)", slider_s32_val); UI_PrefWidth(ui_pct(slider_pct, 1.f)) UI_HeightFill UI_FixedX(0) UI_FixedY(0) UI_Palette(ui_build_palette(ui_top_palette(), .background = df_rgba_from_theme_color(DF_ThemeColor_HighlightOverlay)))