mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-07-08 12:59:24 +00:00
Theme: Color mapping improvements/no theme defaults
This commit is contained in:
@@ -267,6 +267,21 @@ test_access_xtext_palette_forwarding (void)
|
||||
g_assert_cmpuint (palette[3].blue, ==, 6);
|
||||
}
|
||||
|
||||
static void
|
||||
test_access_xtext_palette_default_99_preserves_base (void)
|
||||
{
|
||||
XTextColor palette[99] = { 0 };
|
||||
|
||||
reset_stubs ();
|
||||
theme_get_xtext_colors (palette, G_N_ELEMENTS (palette));
|
||||
g_assert_cmpint (stub_runtime_xtext_calls, ==, 1);
|
||||
g_assert_cmpfloat_with_epsilon (palette[0].red, 1.0, 0.0001);
|
||||
g_assert_cmpfloat_with_epsilon (palette[31].blue, 34.0, 0.0001);
|
||||
g_assert_cmpfloat_with_epsilon (palette[32].red, 0.0, 0.0001);
|
||||
g_assert_cmpfloat_with_epsilon (palette[32].green, 0x74 / 255.0, 0.0001);
|
||||
g_assert_cmpfloat_with_epsilon (palette[32].blue, 0.0, 0.0001);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
test_access_widget_style_forwarding (void)
|
||||
@@ -361,6 +376,8 @@ main (int argc, char **argv)
|
||||
g_test_add_func ("/theme/access/semantic_token_routes_directly", test_access_semantic_token_routes_directly);
|
||||
g_test_add_func ("/theme/access/token_routes_without_legacy_accessor", test_access_token_routes_without_legacy_accessor);
|
||||
g_test_add_func ("/theme/access/xtext_palette_forwarding", test_access_xtext_palette_forwarding);
|
||||
g_test_add_func ("/theme/access/xtext_palette_default_99_preserves_base",
|
||||
test_access_xtext_palette_default_99_preserves_base);
|
||||
g_test_add_func ("/theme/access/xtext_palette_widget_mapping_when_gtk3_active",
|
||||
test_access_xtext_palette_widget_mapping_when_gtk3_active);
|
||||
g_test_add_func ("/theme/access/widget_style_forwarding", test_access_widget_style_forwarding);
|
||||
|
||||
Reference in New Issue
Block a user