Index: admin_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v
retrieving revision 1.11.2.8
diff -u -p -r1.11.2.8 admin_menu.inc
--- admin_menu.inc	8 Aug 2008 20:45:45 -0000	1.11.2.8
+++ admin_menu.inc	10 Aug 2008 23:41:01 -0000
@@ -333,11 +333,16 @@ function admin_menu_adjust_items(&$menu_
  * Form builder function for module settings.
  */
 function admin_menu_theme_settings() {
+  $themes = list_themes();
+  foreach ($themes as $key => $data) {
+    $options[$key] = $data->info['name'];
+  }
   $form['admin_menu_margin_top'] = array(
-    '#type' => 'checkbox',
+    '#type' => 'checkboxes',
     '#title' => t('Apply margin-top to page body'),
-    '#default_value' => variable_get('admin_menu_margin_top', 1),
-    '#description' => t('If enabled, the output of this site will be shifted for approx. 20 pixels from the top of the viewport to make room for the Administration Menu. If this setting is disabled, some absolute or fixed positioned page elements at the top of the viewport may be covered by Administration Menu.'),
+    '#options' => $options,
+    '#default_value' => variable_get('admin_menu_margin_top', array()),
+    '#description' => t('If enabled for a given theme, the output of this site will be shifted for approx. 20 pixels from the top of the viewport to make room for the Administration Menu. If disabled, some absolute or fixed positioned page elements at the top of the viewport may be covered by Administration Menu.'),
   );
   $form['tweaks'] = array(
     '#type' => 'fieldset',
Index: admin_menu.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.install,v
retrieving revision 1.4.2.3
diff -u -p -r1.4.2.3 admin_menu.install
--- admin_menu.install	26 Jun 2008 20:08:37 -0000	1.4.2.3
+++ admin_menu.install	10 Aug 2008 23:43:45 -0000
@@ -31,4 +31,21 @@ function admin_menu_update_6000() {
   return $ret;
 }
 
+/**
+ * Convert margin-top settings to be per-theme.
+ */
+function admin_menu_update_6001() {
+  $ret = array();
+  $themes_margin = array();
+  $margin_top = variable_get('admin_menu_margin_top', 1);
+  if ($margin_top) {
+    $themes = list_themes();
+    foreach ($themes as $key => $data) {
+      $themes_margin[$key] = $key;
+    }
+  }
+  variable_set('admin_menu_margin_top', $themes_margin);
+  $ret[] = array('query' => 'Updated margin-top settings', 'success' => TRUE);
+  return $ret;
+}
 
Index: admin_menu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v
retrieving revision 1.43.2.6
diff -u -p -r1.43.2.6 admin_menu.module
--- admin_menu.module	20 Jul 2008 19:11:57 -0000	1.43.2.6
+++ admin_menu.module	10 Aug 2008 23:39:11 -0000
@@ -91,8 +91,11 @@ function admin_menu_init() {
     drupal_add_css($path .'/admin_menu.css', 'module', 'all', FALSE);
     // Performance: Defer execution.
     drupal_add_js($path .'/admin_menu.js', 'module', 'header', TRUE);
-
-    drupal_add_js(array('admin_menu' => array('margin_top' => variable_get('admin_menu_margin_top', 1))), 'setting');
+    // Initialize the theme system to determine whether to apply a margin-top.
+    init_theme();
+    global $theme_key;
+    $themes_margin = variable_get('admin_menu_margin_top', array());
+    drupal_add_js(array('admin_menu' => array('margin_top' => !empty($themes_margin[$theme_key]))), 'setting');
     if ($_GET['q'] == 'admin/build/modules') {
       drupal_add_js(array('admin_menu' => array('tweak_modules' => variable_get('admin_menu_tweak_modules', 1))), 'setting');
     }
