Loving the new 2.x branch of environment indicator, and now that you can programatically provide the colors in the settings file, this is a winner over the 1.x branch.
We do however need to change the toolbar drawer color, as by default JavaScript programatically makes this 25% lighter then the main color used for the toolbar. This leads to really ugly color combinations, and essentially limits your choice of color palette.
Attached is a patch that optionally adds a new variable, that if not provided will default to the old behavior (so no need to provide any upgrade path).
Also patched the README file to explain this.
Example settings.php file with the new variable:
// Configure environment module.
$conf['environment_indicator_overwrite'] = TRUE;
$conf['environment_indicator_overwritten_name'] = 'DEVELOPMENT';
$conf['environment_indicator_overwritten_color'] = '#9bb03b';
$conf['environment_indicator_overwritten_drawer_color'] = '#333333';
$conf['environment_indicator_overwritten_text_color'] = '#ffffff';
$conf['environment_indicator_overwritten_position'] = 'top';
$conf['environment_indicator_overwritten_fixed'] = FALSE;
Comment | File | Size | Author |
---|---|---|---|
#8 | 2343823-environment_indicator-drawer-color-8.patch | 9.22 KB | jweowu |
Comments
Comment #1
wiifmWhoops, patch against the git root, try this.
Comment #2
wiifmOK, one more shot.
Comment #3
GoldThis looks much better. I have this patch running and it doesn't appear to introduce any extra issues.
Comment #4
e0ipsoThanks a lot for the patch! It looks great, but it's missing some features.
This should be accompanied by the possibility to choose the drawer color also using the UI environment indicators.
Comment #5
wiifmAlright, I have added the ability to control the drawer color through the UI, also this is now saved with the ctools exportables. Also added in farbtastic support for the color picker.
Example export:
Comment #6
Juterpillar CreditAttribution: Juterpillar commentedThe colour picker in the UI for the drawer works as specified without any obvious bugs. Great patch, thanks wiifm.
Comment #7
e0ipsoIn my opinion this adds a great deal of control to the appearance of the indicator, but it adds more complexity to the indicator configuration.
Would you be up to add the farbtastic picker in a collapsed fieldset (maybe labelled More options) and make it optional? If nothing is selected there, then the current behavior is applied.
Thanks for this great patch!
Comment #8
jweowu CreditAttribution: jweowu commentedRe-rolled #5 against HEAD. No other changes.
Comment #9
e0ipsoVersion for D7 is unmaintained. I am sorry for the inconvenience.