From ccccf95b3914e8614f68dd2dbbdce95744ed802c Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 14 Jun 2024 16:09:19 -0600 Subject: [PATCH] Framework WIP: - Set preferred font size & system fonts --- kdots/inc/class.kdots_framework.inc.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/kdots/inc/class.kdots_framework.inc.php b/kdots/inc/class.kdots_framework.inc.php index 8ea34d3ca0..5ded64cacc 100644 --- a/kdots/inc/class.kdots_framework.inc.php +++ b/kdots/inc/class.kdots_framework.inc.php @@ -147,4 +147,26 @@ class kdots_framework extends Api\Framework\Ajax $title . ''; } + + /** + * Set site-wide CSS like preferred font-size + * + * @return array + * @see Api\Framework::_get_css() + */ + public function _get_css() + { + $ret = parent::_get_css(); + + $textsize = $GLOBALS['egw_info']['user']['preferences']['common']['textsize'] ?? '12'; + $ret['app_css'] .= " + :root, :host, body, input { + font-size: {$textsize}px; + font-family: egroupware, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; + } + "; + + return $ret; + } }