summaryrefslogtreecommitdiff
path: root/src/profile-editor.c
diff options
context:
space:
mode:
authorVictor Kareh <[email protected]>2026-03-16 14:58:57 -0400
committerVictor Kareh <[email protected]>2026-03-16 15:22:29 -0400
commit370ef4ba3ccf88bec959a647249f8f720204cc17 (patch)
tree3be2e2f2c7b604a8b724c5daa853a58f22997cd1 /src/profile-editor.c
parent40a129a26d9006e51dd63ddcde6cd2e210d30b92 (diff)
downloadmate-terminal-fix-color-scheme-combo.tar.bz2
mate-terminal-fix-color-scheme-combo.tar.xz
profile-editor: fix color scheme combo not restoring selectionfix-color-scheme-combo
The built-in color scheme dropdown always showed "Custom" when reopening the profile editor. Two bugs were present: - color comparison was called as pointer-to-pointer comparison, which always fails. - gdk_rgba_equal does exact floating-point comparison, which is too strict for colors that have been round-tripped through GSettings string serialization. Using the fuzzy rgba_equal function fixes that. Fixes #486
Diffstat (limited to 'src/profile-editor.c')
-rw-r--r--src/profile-editor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/profile-editor.c b/src/profile-editor.c
index f4959db..520a61b 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -380,8 +380,8 @@ profile_colors_notify_scheme_combo_cb (TerminalProfile *profile,
{
for (i = 0; i < G_N_ELEMENTS (color_schemes); ++i)
{
- if (gdk_rgba_equal (&fg, &color_schemes[i].foreground) &&
- gdk_rgba_equal (&bg, &color_schemes[i].background))
+ if (rgba_equal (fg, &color_schemes[i].foreground) &&
+ rgba_equal (bg, &color_schemes[i].background))
break;
}
}