Skip to content

Commit ffbe903

Browse files
committed
Bugfix: wrong default active color
1 parent 3a2ad28 commit ffbe903

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/include/elements/element/gallery/button.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -643,12 +643,12 @@ namespace cycfi::elements
643643

644644
inline color default_button_styler::get_body_color() const
645645
{
646-
return get_theme().default_button_color.level(0.9);
646+
return get_theme().default_button_color;
647647
}
648648

649649
inline color default_button_styler::get_active_body_color() const
650650
{
651-
return get_theme().default_button_color.opacity(0.5);
651+
return get_body_color();
652652
}
653653

654654
inline color default_button_styler::get_text_color() const

lib/src/element/gallery/button.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ namespace cycfi::elements
6666
auto value = state.value;
6767
auto hilite = state.hilite;
6868
auto enabled = ctx.enabled;
69-
auto body_color = value? get_active_body_color() : get_body_color();
69+
auto body_color = value?
70+
get_active_body_color().opacity(0.5) :
71+
get_body_color().level(0.9)
72+
;
7073

7174
// Draw the body
7275
if (value)

0 commit comments

Comments
 (0)