give users interface to set tab, location bar, & search bar opacity



9 years ago
3 years ago


(Reporter: myk, Unassigned)





(1 attachment)



9 years ago
Created attachment 402668 [details]
mockup of potential interface

Per bug 486460, there are nnnow hidden preferences for overriding the opacity of tabs, the location bar, and the search bar, but we anticipate enough of an interest in these preferences to warrant making them visible through the preferences dialog of the extension.

Here's a mockup of a potential interface.  In the mockup, the preferences are modified via two sliders in a new group of the preferences dialog.  A button, when pressed, restores the default settings.

The interface uses the words "lighter" and "darker" rather than "opacity" and "transparency" because the latter are relatively technical terms, even though they are more accurate (and "lighter" widgets might actually be darker if the persona behind them is dark).

The sliders should increment in 10% steps, so they have 11 possible positions corresponding to opacity values 0.0 to 1.0.  A slider slid all the way to the left represents 0.0 opacity (completely transparent), while the rightmost position represents 1.0 opacity (completely opaque) and the middle position represents 0.5 opacity.

The label for the preference group should be "Appearance", and the sliders should be labeled "Active Tab, Location Bar, Search Bar" and "Inactive Tabs".  Their left ends should be labeled "Lighter" and their right ends "Darker.  The button should be labeled "Restore Defaults".

(The mockup also shows how we might give the users the ability to set the text and accent colors as well, although that's out of scope for this bug.)
i'll have a shot at implementing this.
Assignee: cbeard → bugzilla
i'm having a whole lot of trouble getting a slider hooked up to a float.
in hindsight this should have probably been done as an integer, 0 to 100.

Comment 3

9 years ago
I think having the pref reflect the actual values to which the CSS property is set is the right thing to, the problem is just making the slider generate those values.  Rather than trying to make it do so, simply have it generate a value between 0 and 100 and then convert that to the value of the pref by dividing it by 100.

Comment 4

9 years ago
Here's an example of exactly that approach:
i'm having many types of fun with the xul scale and onsyncfrompreference/onsynctopreference..

Comment 6

9 years ago
Yikes!  Sadly, you're probably better off doing the syncing yourself instead of relying on the built-in functionality, which clearly doesn't work right. :-(
ah, i was doing it wrong.  that's good :)
Target Milestone: -- → Future
Assignee: glob → nobody
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.