• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Zoom resolution server client 4k - FullHD

Scheduled Pinned Locked Moved Custom CSS
3 Posts 2 Posters 324 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    botswana
    last edited by Feb 9, 2024, 8:19 AM

    hi,
    I’m looking for a simple way to realize different zoom factors on client (1080p) and server (2160p) screen.
    would you do this with a custom css? how can I figure out the mods text tag?

    S 1 Reply Last reply Feb 9, 2024, 11:58 AM Reply Quote 0
    • S Offline
      sdetweil @botswana
      last edited by Feb 9, 2024, 11:58 AM

      @botswana there is currently no way to do different zoom levels (or content) by viewer (on the pi is just a different browser)

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Feb 9, 2024, 12:44 PM Reply Quote 0
      • S Offline
        sdetweil @sdetweil
        last edited by sdetweil Feb 9, 2024, 1:24 PM Feb 9, 2024, 12:44 PM

        @botswana you might be able to use a customized css to set different font size based on screen resolution.

        on another system I use

        :root{
          --scale-factor: 1;  /* set default scaling in case we have partial window, debug or in vm terminal window */
        }
        
        @media screen  and (width:1920px) and (orientation: landscape) {
            :root{
                --scale-factor: 1920/1920;
             };
         }
        
        @media screen and (width:3840px)  and (orientation: landscape) {
            :root{
            --scale-factor: 3840/1920;
        
            };
        }
        @media  screen and (width:1080px)   {
            :root{
            --scale-factor: 1920/1920;
            };
        }
        

        and then an example use

        h1 {
            font-size:  calc( 120px * var(--scale-factor));
        }
        

        the 120px could be a variable too…

        magicmirror sets these variables. maybe you can scale them by screen resolution and not have to mod everything… BUT many modules don’t use the predefined css styles

        :root {
          --color-text: #999;
          --color-text-dimmed: #666;
          --color-text-bright: #fff;
          --color-background: #000;
          --font-primary: "Roboto Condensed";
          --font-secondary: "Roboto";
          --font-size: 20px;
          --font-size-xsmall: 0.75rem;
          --font-size-small: 1rem;
          --font-size-medium: 1.5rem;
          --font-size-large: 3.25rem;
          --font-size-xlarge: 3.75rem;
          --gap-body-top: 60px;
          --gap-body-right: 60px;
          --gap-body-bottom: 60px;
          --gap-body-left: 60px;
          --gap-modules: 30px;
        }
        

        and maybe css transform:scale()
        https://caniuse.com/css-zoom

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          2/3
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy