Index: admin_menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.inc,v
retrieving revision 1.11.2.7
diff -u -p -r1.11.2.7 admin_menu.inc
--- admin_menu.inc	14 Jul 2008 22:27:19 -0000	1.11.2.7
+++ admin_menu.inc	20 Jul 2008 19:46:14 -0000
@@ -333,11 +333,16 @@ function admin_menu_adjust_items(&$menu_
  * Form builder function for module settings.
  */
 function admin_menu_theme_settings() {
-  $form['admin_menu_margin_top'] = array(
-    '#type' => 'checkbox',
-    '#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.'),
+  $themes = list_themes();
+  foreach ($themes as $key => $data) {
+    $options[$key] = $data->info['name'];
+  }
+  $form['admin_menu_margin_top_omit'] = array(
+    '#type' => 'checkboxes',
+    '#title' => t("Don't apply margin-top to page body"),
+    '#options' => $options,
+    '#default_value' => variable_get('admin_menu_margin_top_omit', array()),
+    '#description' => t('Unless disabled 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 this setting is 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	20 Jul 2008 19:46:14 -0000
@@ -31,4 +31,20 @@ function admin_menu_update_6000() {
   return $ret;
 }
 
+/**
+ * Convert margin-top settings to be per-theme.
+ */
+function admin_menu_update_6001() {
+  $margin_top = variable_get('admin_menu_margin_top', 1);
+  if (!$margin_top) {
+    $themes = list_themes();
+    foreach ($themes as $key => $data) {
+      $omit[$key] = $key;
+      variable_set('admin_menu_margin_top_omit', $omit);
+    }
+  }
+  variable_del('admin_menu_margin_top');
+  $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.5
diff -u -p -r1.43.2.5 admin_menu.module
--- admin_menu.module	18 Jul 2008 14:41:24 -0000	1.43.2.5
+++ admin_menu.module	20 Jul 2008 19:46:14 -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 so we know which theme is being used.
+    init_theme();
+    global $theme_key;
+    $omit = variable_get('admin_menu_margin_top_omit', array());
+    drupal_add_js(array('admin_menu' => array('margin_top' => empty($omit[$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');
     }
