Closed
Bug 264164
Opened 21 years ago
Closed 20 years ago
Radio and check indicator w/ Classic theme remains hover state look
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)
References
Details
(Keywords: fixed1.8.1, regression)
Attachments
(6 files, 3 obsolete files)
65.54 KB,
image/jpeg
|
Details | |
61.14 KB,
image/png
|
Details | |
51.46 KB,
image/jpeg
|
Details | |
3.12 KB,
patch
|
bryner
:
review-
|
Details | Diff | Splinter Review |
5.01 KB,
patch
|
ginnchen+exoracle
:
review-
|
Details | Diff | Splinter Review |
6.51 KB,
patch
|
roc
:
review+
roc
:
superreview+
roc
:
approval-branch-1.8.1+
|
Details | Diff | Splinter Review |
I'm using trunk GTK2 build/20041008 on JDS2.
Radio and check indicator w/ Classic theme sometimes has a trail, when mouse
move over it.
It looks as hover state after mouse pointer leaves.
See attached ScreenShot.
I don't have this problem with Mozilla 1.7.
Comment 2•21 years ago
|
||
Sarah, can you take a look at this and see if it's reproduceable?
Comment 3•21 years ago
|
||
Ginn, it's not clear to me what the problem is from looking at the screenshot.
testing this with today's gtk2 nightly build, after I click a radiobutton or
checkbox, when I move the mouse off of the widget, the hover "highlighting"
effect goes away for me. what remains is the the dotted focus ring --but I'd
think that's expected since that's where focus was last (ie, where I last
*clicked* the mouse).
Comment 4•21 years ago
|
||
fwiw, I also see the same thing in comment 3 using a gtk1 nightly from
2005-01-02-trunk.
(In reply to comment #3)
> Ginn, it's not clear to me what the problem is from looking at the screenshot.
>
All the checkboxes and radios except 'Home page' is in hover state (blue).
Does checkbox/radio changes color with your gnome-theme?
If so, you can just move mouse over them without click, this bug will be reproduced.
With some gnome themes, this bug is not obvious.
I only tested GTK2 build on Linux/Solaris.
Comment 6•21 years ago
|
||
I realized that providing a screenshot of what I see might be helpful. :)
Ginn, I'm using the default RedHat gnome-theme, called Bluecurve. (well,
default for fedora core 2.)
Comment 7•21 years ago
|
||
Comment on attachment 170312 [details]
screenshot using default gnome-theme
oh, wait a sec --let me get an image showing the focus...
Attachment #170312 -
Attachment is obsolete: true
Comment 8•21 years ago
|
||
when taking this screenshot, I clicked on the "home page" radiobutton which
displays both the dotted focus ring and the paler-grey hover style.
when I moved my mouse away from this radiobutton, the focus ring persisted
(till I clicked elsewhere), but the paler-grey hover style went away (which
seems expected).
(In reply to comment #8)
> Created an attachment (id=170313) [edit]
> screenshot showing focus
>
The problem is with bluecurve theme, the radio/checkbox doesn't change when you
hover it.
Try "Ocean Dream" theme. The radio/checkbox will be lighter when you hover it.
Although it's still not very obvious.
I can reproduce this bug with RH9, 20050104 nightly GTK2 build.
I think it's a regression, I can't reproduce it with 20040720 mozilla 1.8a3.
Assignee | ||
Comment 10•21 years ago
|
||
Please notice that in this screenshot "Search" "Print" checkboxes and "Home
page" "Last page visited" radios are all in hover state.
Only the exact checkbox/radio under mouse cursor should be in hover state.
Assignee | ||
Comment 11•21 years ago
|
||
a regression caused by
Bug 241070 patch by npeninguy@gmail.com (Nicolas PENINGUY), r=bryner sr=blizzard
Refactor nsNativeThemeGTK
backing out this patch does solve this problem.
Depends on: 241070
Keywords: regression
Assignee | ||
Comment 12•21 years ago
|
||
mozilla/ gfx/ src/ gtk/ nsNativeThemeGTK.cpp
252 // For XUL checkboxes and radio buttons, the state of the parent
253 // determines our state.
254 if (aWidgetType == NS_THEME_CHECKBOX || aWidgetType == NS_THEME_RADIO ||
255 aWidgetType == NS_THEME_CHECKBOX_LABEL ||
256 aWidgetType == NS_THEME_RADIO_LABEL) {
257 if (aWidgetFlags) {
258 nsIAtom* atom = nsnull;
259
260 if (aFrame) {
261 nsIContent* content = aFrame->GetContent();
262 if (content->IsContentOfType(nsIContent::eXUL)) {
263 aFrame = aFrame->GetParent();
mozilla/ gfx/ src/ shared/ nsNativeTheme.cpp
182 if (content->IsContentOfType(nsIContent::eXUL)) {
183 // For a XUL checkbox or radio button, the state of the parent determines
184 // the checked state
185 aFrame = aFrame->GetParent();
duplicates,
I don't know which one should be removed.
Seems we need add #ifdef in mozilla/ gfx/ src/ shared/ nsNativeTheme.cpp,
or we need another refactoring.
Comment 13•21 years ago
|
||
The GTK1 hover effects work fine in my standard RH7.3 installation.
Updated•21 years ago
|
Flags: blocking1.8b?
Flags: blocking1.8a6?
Flags: blocking1.8a6-
Comment 14•21 years ago
|
||
Hmm, sorry for that... I can reproduce it using the "Ocean Dream" theme.
nsNativeThemeGTK::GetGtkWidgetAndState() is quite complicated, and I'm afraid of
breaking something else. :(
Simple patch restoring the old behaviour is coming...
Comment 15•21 years ago
|
||
Attachment #172213 -
Flags: review?(bryner)
Updated•21 years ago
|
Flags: blocking1.8b?
Flags: blocking1.8b-
Flags: blocking1.8a6-
Assignee | ||
Comment 16•21 years ago
|
||
The patch looks good to me.
I really want it get fixed before 1.8b.
It is horrible to Java Desktop System users.
Comment 17•20 years ago
|
||
Comment on attachment 172213 [details] [diff] [review]
Simple fix
I don't want to refork this method from the shared base class. Can you figure
out how/why nsNativeTheme::GetContentState gives a different result from the
one we're expecting?
Attachment #172213 -
Flags: review?(bryner) → review-
Assignee | ||
Comment 18•20 years ago
|
||
(In reply to comment #17)
> (From update of attachment 172213 [details] [diff] [review] [edit])
> I don't want to refork this method from the shared base class. Can you figure
> out how/why nsNativeTheme::GetContentState gives a different result from the
> one we're expecting?
>
In nsNativeTheme.cpp, there is aFrame = aFrame->GetParent(); for radio/checkbox
in XUL.
But the nsNativeThemeGTK::GetContentState doesn't have it.
For this situation, the GetParent() method is used in nsNativeThemeGTK before
calling GetContentState(), and may have other uses there.
Updated•20 years ago
|
Flags: blocking-aviary1.1? → blocking-aviary1.1-
Updated•20 years ago
|
Flags: blocking1.8b2? → blocking1.8b2-
Assignee | ||
Comment 19•20 years ago
|
||
Move aFrame = aFrame->GetParent(); out of nsNativeThemeGTK.
Please review it, this bug is very obvious on JDS or debian.
Attachment #190682 -
Flags: review?(bryner)
Assignee | ||
Comment 20•20 years ago
|
||
my patch is not working on trunk now...
Attachment #190682 -
Attachment is obsolete: true
Attachment #190682 -
Flags: review?(bryner)
Assignee | ||
Comment 21•20 years ago
|
||
My last patch was wrong.
This patch works fine, but I'm wondering whether we should check
XULCheckboxRadio and do GetParent() in both GetGtkWidgetAndState() and
GetContentState().
But this bug is really bad to me.
Attachment #194285 -
Flags: review?(bryner)
Comment 22•20 years ago
|
||
*** Bug 289767 has been marked as a duplicate of this bug. ***
Comment 23•20 years ago
|
||
*** Bug 301976 has been marked as a duplicate of this bug. ***
This bug is also obvious in GNOME Industrial.
Comment 25•20 years ago
|
||
*** Bug 281228 has been marked as a duplicate of this bug. ***
Comment 26•20 years ago
|
||
Pulling blocking requests from bug 281228 over to this bug.
Flags: blocking1.9a1?
Flags: blocking1.8.1?
Comment 27•20 years ago
|
||
Pull over the CC'd list from bug 281228 to maybe help get this bug fixed (a patch is waiting to be reviewed).
Comment 28•20 years ago
|
||
Comment on attachment 194285 [details] [diff] [review]
another approach for this bug
Ok, I understand now. I don't really like this patch either, because it assumes (in cross-platform code) that the checkbox-with-spacing binding is being used. It seems like there's a pretty simple solution though:
1. Adjust aFrame for CHECKBOX_LABEL/RADIO_LABEL
2. Call GetContentState
3. All of the other processing before we start setting aState, but take out the frame adjustment for CHECKBOX_LABEL/RADIO_LABEL
Comment 29•20 years ago
|
||
*** Bug 317217 has been marked as a duplicate of this bug. ***
Comment 30•20 years ago
|
||
This fixes it for me. It adjusts aFrame only for the label case, since GetContentState knows how to do it for the non-label case. I also reduced the over-wide scope of the |if (aWidgetFlags)| check, since we want to do this regardless of whether aWidgetFlags is true (so we can set aState).
Attachment #203863 -
Flags: review?(roc)
Assignee | ||
Comment 31•20 years ago
|
||
(In reply to comment #30)
> Created an attachment (id=203863) [edit]
> proposed fix
>
> This fixes it for me. It adjusts aFrame only for the label case, since
> GetContentState knows how to do it for the non-label case. I also reduced the
> over-wide scope of the |if (aWidgetFlags)| check, since we want to do this
> regardless of whether aWidgetFlags is true (so we can set aState).
>
This patch is not correct. I applied it to a last month's build.
Every checkbox rendered as unchecked state no matter it is checked or not.
Comment 32•20 years ago
|
||
*** Bug 317851 has been marked as a duplicate of this bug. ***
Comment 33•20 years ago
|
||
*** Bug 320216 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 34•20 years ago
|
||
I think bryner had made some mistakes in his patch.
stateFrame is assigned but never used after in his patch.
This patch worked for me now.
Assignee: blizzard → ginn.chen
Attachment #203863 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #206382 -
Flags: review?(roc)
Attachment #203863 -
Flags: review?(roc)
Attachment #203863 -
Attachment is obsolete: false
Attachment #203863 -
Flags: review-
Comment on attachment 206382 [details] [diff] [review]
make bryner's patch work
ok, great. sorry about the delay.
Attachment #206382 -
Flags: superreview+
Attachment #206382 -
Flags: review?(roc)
Attachment #206382 -
Flags: review+
Assignee | ||
Comment 36•20 years ago
|
||
Fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Attachment #194285 -
Attachment is obsolete: true
Attachment #194285 -
Flags: review?(bryner)
Assignee | ||
Comment 37•20 years ago
|
||
Comment on attachment 206382 [details] [diff] [review]
make bryner's patch work
important for gtk/gtk2 users, affect Firefox on a lot of Linux/Unix distributions
Attachment #206382 -
Flags: approval1.8.1?
Updated•20 years ago
|
Attachment #206382 -
Flags: approval1.8.1? → branch-1.8.1?(roc)
Attachment #206382 -
Flags: approval-branch-1.8.1?(roc) → approval-branch-1.8.1+
Assignee | ||
Comment 38•20 years ago
|
||
Checking in gfx/src/gtk/nsNativeThemeGTK.cpp;
/cvsroot/mozilla/gfx/src/gtk/Attic/nsNativeThemeGTK.cpp,v <-- nsNativeThemeGTK.cpp
new revision: 1.64.8.4; previous revision: 1.64.8.3
done
Keywords: fixed1.8.1
Comment 39•19 years ago
|
||
*** Bug 326147 has been marked as a duplicate of this bug. ***
Updated•19 years ago
|
Flags: blocking1.9a1?
Flags: blocking1.8.1?
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•