Closed
Bug 1311499
Opened 8 years ago
Closed 3 years ago
incorrect scale input checkbox on gtk 3.20
Categories
(Core :: Widget: Gtk, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: vitalik.perevertun, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: tpi:+)
Attachments
(11 files)
(deleted),
image/png
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-csrc
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
application/x-xz
|
Details | |
(deleted),
text/x-csrc
|
Details | |
(deleted),
text/plain
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
image/png
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151029151421
Steps to reproduce:
open any site with checkbox
Linux x86_64
GTK 3.22
Firefox 48,49
Actual results:
After migrate firefox to gtk3, checkbox is incorrect scaled.
See screenshot "before".
More detail info see bug in gnome bugzilla.
https://bugzilla.gnome.org/show_bug.cgi?id=773059
Expected results:
checkbox must be look like as screenshot "after".
Reporter | ||
Updated•8 years ago
|
Severity: normal → major
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Updated•8 years ago
|
Blocks: gtk-3.22
Summary: incorrect scale input checkbox on gtk3 → incorrect scale input checkbox on gtk 3.22
Updated•8 years ago
|
Priority: -- → P3
Updated•8 years ago
|
Whiteboard: tpi:+
Comment 1•8 years ago
|
||
Same with Adwaita 3.20.
Reporter | ||
Comment 2•8 years ago
|
||
patch to firefox-50.1.0.source.tar.xz
Reporter | ||
Comment 3•8 years ago
|
||
I think, i found problem.
For checkbox(also radiobox) 'indicator-size' and 'indicator-spacing' is deprecated.
See https://developer.gnome.org/gtk3/stable/GtkCheckButton.html#GtkCheckButton--s-indicator-size
GtkCheckButton:indicator-size has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS min-width and min-height on the indicator node.
GtkCheckButton:indicator-spacing has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS margins of the indicator node, the value of this style property is ignored.
in https://hg.mozilla.org/mozilla-central/file/tip/widget/gtk/gtk2drawing.c
line 1048 in moz_gtk_toggle_paint()
If 'indicator-spacing' set to zero, then problem is gone.
(need add line '* {-GtkCheckButton-indicator-spacing: 0;}' to gtk theme style)
I prepared a patch that should solve this problem.
1) use min-width/min-height instead of indicator-size
2) use margin width/height instead of indicator-spacing
This also fix problem if min-width/min-height have different size (more than 16px)
Also need adapt code in widget/gtk/gtk3drawing.cpp
I hope it will help in solving this bug.
Reporter | ||
Comment 4•8 years ago
|
||
test program.
compile with this
gcc `pkg-config --cflags gtk+-3.0` -o test_checkbox test_checkbox.c `pkg-config --libs gtk+-3.0`
Comment 5•8 years ago
|
||
Thanks for the patch, but AFAIK the Gtk2 code is going to be removed soon. We may need such patch for Gtk3.
Reporter | ||
Comment 6•8 years ago
|
||
I just showed the sample solution on the gtk2.
I do not know all the dependencies in the code, so i can miss something.
> Also need adapt code in widget/gtk/gtk3drawing.cpp
The word 'code' i mean 'patch'.
Reporter | ||
Comment 7•8 years ago
|
||
Reporter | ||
Comment 8•8 years ago
|
||
Reporter | ||
Comment 9•8 years ago
|
||
Reporter | ||
Comment 10•8 years ago
|
||
$ cd .themes/
$ tar -xvf test1.tar.xz
select gtk theme 'Test1'
Reporter | ||
Comment 11•8 years ago
|
||
gcc `pkg-config --cflags gtk+-3.0` -o test_checkbox3 test_checkbox3.c `pkg-config --libs gtk+-3.0`
Reporter | ||
Comment 12•8 years ago
|
||
Reporter | ||
Comment 13•8 years ago
|
||
patch applied to https://hg.mozilla.org/mozilla-central/
I have not tested the patch, but it should work.
Reporter | ||
Comment 14•8 years ago
|
||
tested on firefox 51.0.1.
Reporter | ||
Comment 15•8 years ago
|
||
Test1 theme:
$ cat ~/.themes/test1/gtk-3.22/gtk.css
@import url("resource:///org/gtk/libgtk/theme/Adwaita/gtk-contained.css");
check
{
border: 2px solid red;
padding: 2px;
}
/* focus can be changed with 'outline' style properties. */
Comment 16•3 years ago
|
||
Hello!I have tried to reproduce the issue with firefox 96.0a1, 95.0a1 and 94.0 on Ubuntu 20.04, the issue does not occur in the latest version, continuing with marking this issue as RESOLVED->WORKSFORME.
If this issue is still valid please feel free to reopen this issue.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•