GNOME Bugzilla – Bug 773059
change size check box to 16 px
Last modified: 2016-12-24 16:28:45 UTC
Created attachment 337802 [details] sceenshot check box before and after after migrate firefox to gtk3, check box is incorrect scaled. gtk3 Adwaita theme draw check box with 14 px size, but firefox try scale this size to 16 px. to resolve this i can set style "-moz-transform: scale(0.875);" to input element checkbox, but this need do for every site. I understand that this bug is on the side firefox, but this can easy fixed in gtk3. see attached screenshot.
Created attachment 337803 [details] test theme unpack to ~/.themes and switch theme on newtheme1
Created attachment 337804 [details] [review] draft patch
Setting min-height and min-width to 16px actually draws a 18px x 18px check (since those acts on the padding-box you'll have to add the border), also making the check graphic blurry since it's 14px x 14px. This really is firefox bug, I don't feel like working around.
P.S. : don't get me wrong your effort is appreciated, but I don't really see any possible solution here other than fixing the firefox bug :-/
Ok. I reported a bug to firefox bugzilla. https://bugzilla.mozilla.org/show_bug.cgi?id=1311499
I found commit https://git.gnome.org/browse/gtk+/commit/gtk/gtkcheckbutton.c?h=gtk-3-22&id=0291978acc10a8cc4bcff8dbc2600703facd3a0e Deprecated: 3.20: Use CSS min-width and min-height on the indicator node. How get "min-width" and "min-height" for checkbox with css in c program code? This code using in firefox: gtk_widget_style_get(widget, "indicator_size", indicator_size, "indicator_spacing", indicator_spacing, NULL); Now "indicator_size" statically return 16px. How to fix this?
Hi; Bugzilla is a bug tracking system not a help forum. You should ask on gtk-app-devel-list@gnome.org or on gtk-list@gnome.org. Querying the state of the style is usually the indication of some wrong assumption, or some code ported from the old GTK+ 2.x style system. Please: send an email to the mailing list, describing your use case and some additional code to provide context. Thanks again.
https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/gtk2drawing.c line 1048 and 786 gint moz_gtk_radio_get_metrics(gint* indicator_size, gint* indicator_spacing) { ensure_radiobutton_widget(); gtk_widget_style_get (gRadiobuttonWidget, "indicator_size", indicator_size, "indicator_spacing", indicator_spacing, NULL); return MOZ_GTK_SUCCESS; } ... gtk_paint_check(style, drawable, state_type, shadow_type, cliprect, gCheckboxWidget, "checkbutton", x, y, width, height);
Again, please: use the mailing list. Additionally, that's GTK 2.x API, whereas this bug relates to the 3.x API series of GTK+.