GNOME Bugzilla – Bug 593471
Account Name menu should change background when opened
Last modified: 2009-08-29 19:33:19 UTC
Created attachment 141978 [details] Screenshot I think the Account Name menu (upper-right corner) should change the background when open, similar to how the Activities button changes the background color.
Created attachment 141979 [details] [review] Simplify "toggle button" usage of Button class for bug 593362 making sure that the button properly deactivated when the menu failed to pop up, and never thought to check that it was staying active when the menu did pop up. (Though it's not a regression - it wasn't staying active before either.) Here's a patch that changes Button around to work in an easier to understand fashion, fixing this bug and allowing removing the ugly code that I added yesterday.
Could I convince you to add this method to ShellButtonBox, and then we can gut the internals of button.js?
Created attachment 141994 [details] [review] Simplify Button class by using ShellButtonBox Make Button class purely about adding visuals, and use ShellButtonBox for behavior. API equivalences: shell.button => shell.actor [for consistency] staysPressed parameter to constructor => replaced by manually setting the 'active' property of button.actor as appropriate pressIn/release => button.actor.active = true/false enter-event/leave-event signals => button.actor notify::hover Along the way, this fixes a bug with the user status menu where it was not getting set to active because the button was getting a leave (triggered by the menu popping up and grabbing the pointer) before for button release, which disabled the staysPressed behavior. Reported by Michael Meeks
(In reply to comment #2) > Could I convince you to add this method to ShellButtonBox, and then we can gut > the internals of button.js? Somehow, I didn't think it would be simple... we use Button in various not-completely-button-like ways. But it's done now. End effect is a good simplification.
Comment on attachment 141994 [details] [review] Simplify Button class by using ShellButtonBox Yep, looks great! Definitely a good cleanup.
Pushed