Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Single place to process font size

  • Loading branch information...
commit e16d803e78ed806447e5bccb027df3790c07d899 1 parent cff9d9d
@nijel nijel authored
View
17 libraries/Theme.class.php
@@ -452,6 +452,23 @@ function getCssIEClearFilter()
}
/**
+ * Gets currently configured font size.
+ *
+ * @return String with font size.
+ */
+ function getFontSize()
+ {
+ $fs = $GLOBALS['PMA_Config']->get('fontsize');
+ if (!is_null($fs)) {
+ return $fs;
+ }
+ if (isset($_COOKIE['pma_fontsize'])) {
+ return $_COOKIE['pma_fontsize'];
+ }
+ return '82%';
+ }
+
+ /**
* Generates code for CSS gradient using various browser extensions.
*
* @param string $start_color Color of gradient start, hex value without #
View
5 themes/original/css/common.css.php
@@ -16,8 +16,7 @@
/* general tags */
html {
- font-size: <?php echo (null !== $GLOBALS['PMA_Config']->get('fontsize') ? $GLOBALS['PMA_Config']->get('fontsize') : (
- isset($_COOKIE['pma_fontsize']) ? $_COOKIE['pma_fontsize'] : '82%'));?>;
+ font-size: <?php echo $_SESSION['PMA_Theme']->getFontSize(); ?>
}
input,
@@ -2614,7 +2613,7 @@
font-size: 0.75em;
z-index: 2;
}
-
+
td.jqplot-cursor-legend-swatch {
vertical-align: middle;
text-align: center;
View
3  themes/pmahomme/css/common.css.php
@@ -16,8 +16,7 @@
/* general tags */
html {
- font-size: <?php echo (null !== $GLOBALS['PMA_Config']->get('fontsize') ? $GLOBALS['PMA_Config']->get('fontsize') : (
- isset($_COOKIE['pma_fontsize']) ? $_COOKIE['pma_fontsize'] : '82%'));?>;
+ font-size: <?php echo $_SESSION['PMA_Theme']->getFontSize(); ?>
}
input,
Please sign in to comment.
Something went wrong with that request. Please try again.