Bug#1135360: gtk2-engines: Redmond theme bug: Disabled checkboxes always show checked.
Ben Fenner
fenfam at sc.rr.com
Fri May 1 16:37:10 BST 2026
Package: gtk2-engines
Version: 1:2.20.2
Severity: important
Tags: patch a11y
X-Debbugs-Cc: fenfam at sc.rr.com
Dear Maintainer,
I've suffered this issue for close to a decade now, but have finally been able
to fix it myself so I am providing a patch.
The Redmond GTK2 theme provided with gtk2-engines has a bug in how it displays
chekboxes. When checkboxes are enabled (on a web site for example) they behave
as expected. However when a checkbox is disabled (again, on a web site for
example) they ALWAYS show as checked, even when they are not.
Playground: https://www.delftstack.com/howto/html/html-checkbox-disabled/#use-
the-disabled-attribute-to-disable-a-checkbox-by-default-in-html
This is a huge problem for me and for many web sites that use disabled
checkboxes to display the current state of Booleans (that are not editable by
the user for various reasons).
I have fixed this on my own machine, but I hope this patch can be applied to
help others like me.
Source file to modify:
/gtk2-engines-2.20.2/engines/redmond/src/redmond_gtk2_drawing.c
Existing code comment:
/***********************************************
* redmond_draw_check -
*
* the Function used to draw all check boxes.
*
* Redmond Check box has essentially 3 looks -
*
* Normal/Prelight -
* base[NORMAL] fill, fg[NORMAL] check
*
* Selected/Active -
* bg[NORMAL] fill, fg[NORMAL] check
*
* Insensitive -
* bg[NORMAL] fill, fg[INSENSITIVE] check
*
* The Shadow Always draws with a state NORMAL.
***********************************************/
Proposed new code comment:
/***********************************************
* redmond_draw_check -
*
* the Function used to draw all check boxes.
*
* Redmond Check box has 6 states represented with 5 visual combinations -
*
* Enabled, Unchecked – base[NORMAL] fill, no check mark
* Enabled, Checked – base[NORMAL] fill, fg[NORMAL] check mark
* Enabled, Active, Unchecked – bg[NORMAL] fill, no check mark
* Enabled, Active, Checked – bg[NORMAL] fill, fg[NORMAL] check mark
* Disabled, Unchecked – bg[NORMAL] fill, no check mark
* Disabled, Checked – bg[NORMAL] fill, fg[INSENSITIVE] check mark
*
* The Shadow always draws with a state NORMAL.
***********************************************/
Existing code:
if ((shadow == GTK_SHADOW_ETCHED_IN) || (state == GTK_STATE_INSENSITIVE))
{
/* force insensitive color for inconsistent checkboxes */
do_redmond_draw_check (cr,
&redmond_style->color_cube.fg[GTK_STATE_INSENSITIVE],
x + 2, y + 2, width - 4, height - 4);
}
else if (shadow == GTK_SHADOW_IN)
{
do_redmond_draw_check (cr,
&redmond_style->color_cube.fg[GTK_STATE_NORMAL],
x + 2, y + 2, width - 4, height - 4);
}
Proposed new code:
if (shadow == GTK_SHADOW_ETCHED_IN)
{
/* inconsistent – always show check */
do_redmond_draw_check (cr,
&redmond_style->color_cube.fg[GTK_STATE_INSENSITIVE],
x + 2, y + 2, width - 4, height - 4);
}
else if (shadow == GTK_SHADOW_IN)
{
/* checked – draw check */
if (state != GTK_STATE_INSENSITIVE)
do_redmond_draw_check (cr,
&redmond_style->color_cube.fg[GTK_STATE_NORMAL],
x + 2, y + 2, width - 4, height - 4);
else
do_redmond_draw_check (cr,
&redmond_style->color_cube.fg[GTK_STATE_INSENSITIVE],
x + 2, y + 2, width - 4, height - 4);
}
/* unchecked (shadow == GTK_SHADOW_OUT) – nothing to do */
-- System Information:
Debian Release: bookworm/sid
APT prefers jammy-updates
APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy'), (100, 'jammy-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.8.0-107-generic (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gtk2-engines depends on:
ii libc6 2.35-0ubuntu3.13
ii libcairo2 1.16.0-5ubuntu2.1
ii libgdk-pixbuf-2.0-0 2.42.8+dfsg-1ubuntu0.5
ii libglib2.0-0 2.72.4-0ubuntu2.9
gtk2-engines recommends no packages.
gtk2-engines suggests no packages.
-- no debconf information
More information about the pkg-gnome-maintainers
mailing list