@@ -710,7 +710,10 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags
710
710
711
711
if (g.LogEnabled )
712
712
LogSetNextTextDecoration (" [" , " ]" );
713
+
714
+ PushStyleColor (ImGuiCol_Text, GetColorU32 (ImGuiCol_ButtonText));
713
715
RenderTextClipped (bb.Min + style.FramePadding , bb.Max - style.FramePadding , label, NULL , &label_size, style.ButtonTextAlign , &bb);
716
+ PopStyleColor ();
714
717
715
718
// Automatically close popups
716
719
// if (pressed && !(flags & ImGuiButtonFlags_DontClosePopups) && (window->Flags & ImGuiWindowFlags_Popup))
@@ -781,7 +784,7 @@ bool ImGui::ArrowButtonEx(const char* str_id, ImGuiDir dir, ImVec2 size, ImGuiBu
781
784
782
785
// Render
783
786
const ImU32 bg_col = GetColorU32 ((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
784
- const ImU32 text_col = GetColorU32 (ImGuiCol_Text);
787
+ const ImU32 text_col = GetColorU32 (ImGuiCol_ButtonText); // MicroStrain
785
788
RenderNavHighlight (bb, id);
786
789
RenderFrame (bb.Min , bb.Max , bg_col, true , g.Style .FrameRounding );
787
790
RenderArrow (window->DrawList , bb.Min + ImVec2 (ImMax (0 .0f , (size.x - g.FontSize ) * 0 .5f ), ImMax (0 .0f , (size.y - g.FontSize ) * 0 .5f )), text_col, dir);
@@ -6538,7 +6541,7 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
6538
6541
g.LastItemData .StatusFlags |= ImGuiItemStatusFlags_ToggledSelection;
6539
6542
6540
6543
// Render
6541
- const ImU32 text_col = GetColorU32 (ImGuiCol_Text);
6544
+ const ImU32 text_col = GetColorU32 (ImGuiCol_HeaderText); // MicroStrain
6542
6545
ImGuiNavHighlightFlags nav_highlight_flags = ImGuiNavHighlightFlags_TypeThin;
6543
6546
if (display_frame)
6544
6547
{
@@ -6578,12 +6581,16 @@ bool ImGui::TreeNodeBehavior(ImGuiID id, ImGuiTreeNodeFlags flags, const char* l
6578
6581
if (span_all_columns)
6579
6582
TablePopBackgroundChannel ();
6580
6583
6584
+ PushStyleColor (ImGuiCol_Text, text_col); // MicroStrain
6585
+
6581
6586
// Label
6582
6587
if (display_frame)
6583
6588
RenderTextClipped (text_pos, frame_bb.Max , label, label_end, &label_size);
6584
6589
else
6585
6590
RenderText (text_pos, label, label_end, false );
6586
6591
6592
+ PopStyleColor (); // MicroStrain
6593
+
6587
6594
if (is_open && !(flags & ImGuiTreeNodeFlags_NoTreePushOnOpen))
6588
6595
TreePushOverrideID (id);
6589
6596
IMGUI_TEST_ENGINE_ITEM_INFO (id, label, g.LastItemData .StatusFlags | (is_leaf ? 0 : ImGuiItemStatusFlags_Openable) | (is_open ? ImGuiItemStatusFlags_Opened : 0 ));
@@ -6852,8 +6859,18 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
6852
6859
PopColumnsBackground ();
6853
6860
}
6854
6861
6862
+ // MicroStrain
6863
+ if (hovered || selected)
6864
+ ImGui::PushStyleColor (ImGuiCol_Text, GetColorU32 (ImGuiCol_HeaderText));
6865
+ else if (disabled_item || disabled_global)
6866
+ ImGui::PushStyleColor (ImGuiCol_Text, GetColorU32 (ImGuiCol_TextDisabled));
6867
+
6855
6868
RenderTextClipped (text_min, text_max, label, NULL , &label_size, style.SelectableTextAlign , &bb);
6856
6869
6870
+ // MicroStrain
6871
+ if (hovered || selected || disabled_item || disabled_global)
6872
+ ImGui::PopStyleColor ();
6873
+
6857
6874
// Automatically close popups
6858
6875
if (pressed && ((window->Flags & ImGuiWindowFlags_Popup) || (window->IsExplicitChild && window->ParentWindow ->Flags & ImGuiWindowFlags_Popup)) && !(flags & ImGuiSelectableFlags_DontClosePopups) && !(g.LastItemData .InFlags & ImGuiItemFlags_SelectableDontClosePopup))
6859
6876
CloseCurrentPopup ();
@@ -8672,10 +8689,10 @@ static ImGuiTabItem* ImGui::TabBarScrollingButtons(ImGuiTabBar* tab_bar)
8672
8689
// window->DrawList->AddRect(ImVec2(tab_bar->BarRect.Max.x - scrolling_buttons_width, tab_bar->BarRect.Min.y), ImVec2(tab_bar->BarRect.Max.x, tab_bar->BarRect.Max.y), IM_COL32(255,0,0,255));
8673
8690
8674
8691
int select_dir = 0 ;
8675
- ImVec4 arrow_col = g.Style .Colors [ImGuiCol_Text];
8692
+ ImVec4 arrow_col = g.Style .Colors [ImGuiCol_TabText]; // MicroStrain
8676
8693
arrow_col.w *= 0 .5f ;
8677
8694
8678
- PushStyleColor (ImGuiCol_Text , arrow_col);
8695
+ PushStyleColor (ImGuiCol_TabText , arrow_col); // MicroStrain
8679
8696
PushStyleColor (ImGuiCol_Button, ImVec4 (0 , 0 , 0 , 0 ));
8680
8697
const float backup_repeat_delay = g.IO .KeyRepeatDelay ;
8681
8698
const float backup_repeat_rate = g.IO .KeyRepeatRate ;
@@ -8732,9 +8749,9 @@ static ImGuiTabItem* ImGui::TabBarTabListPopupButton(ImGuiTabBar* tab_bar)
8732
8749
window->DC .CursorPos = ImVec2 (tab_bar->BarRect .Min .x - g.Style .FramePadding .y , tab_bar->BarRect .Min .y );
8733
8750
tab_bar->BarRect .Min .x += tab_list_popup_button_width;
8734
8751
8735
- ImVec4 arrow_col = g.Style .Colors [ImGuiCol_Text];
8752
+ ImVec4 arrow_col = g.Style .Colors [ImGuiCol_TabText]; // MicroStrain
8736
8753
arrow_col.w *= 0 .5f ;
8737
- PushStyleColor (ImGuiCol_Text , arrow_col);
8754
+ PushStyleColor (ImGuiCol_TabText , arrow_col); // MicroStrain
8738
8755
PushStyleColor (ImGuiCol_Button, ImVec4 (0 , 0 , 0 , 0 ));
8739
8756
bool open = BeginCombo (" ##v" , NULL , ImGuiComboFlags_NoPreview | ImGuiComboFlags_HeightLargest);
8740
8757
PopStyleColor (2 );
@@ -9245,7 +9262,7 @@ void ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb,
9245
9262
else if (unsaved_marker_visible)
9246
9263
{
9247
9264
const ImRect bullet_bb (button_pos, button_pos + ImVec2 (button_sz, button_sz));
9248
- RenderBullet (draw_list, bullet_bb.GetCenter (), GetColorU32 (ImGuiCol_Text ));
9265
+ RenderBullet (draw_list, bullet_bb.GetCenter (), GetColorU32 (ImGuiCol_TabText )); // MicroStrain
9249
9266
}
9250
9267
9251
9268
// This is all rather complicated
@@ -9258,7 +9275,10 @@ void ImGui::TabItemLabelAndCloseButton(ImDrawList* draw_list, const ImRect& bb,
9258
9275
text_ellipsis_clip_bb.Max .x -= unsaved_marker_visible ? (button_sz * 0 .80f ) : 0 .0f ;
9259
9276
ellipsis_max_x = text_pixel_clip_bb.Max .x ;
9260
9277
}
9278
+
9279
+ PushStyleColor (ImGuiCol_Text, GetColorU32 (ImGuiCol_TabText)); // MicroStrain
9261
9280
RenderTextEllipsis (draw_list, text_ellipsis_clip_bb.Min , text_ellipsis_clip_bb.Max , text_pixel_clip_bb.Max .x , ellipsis_max_x, label, NULL , &label_size);
9281
+ PopStyleColor (); // MicroStrain
9262
9282
9263
9283
#if 0
9264
9284
if (!is_contents_visible)
0 commit comments