OctoPrint-TFT icon indicating copy to clipboard operation
OctoPrint-TFT copied to clipboard

Won't scale

Open ngoldack opened this issue 6 years ago • 2 comments

Hello,

the GUI won't scale when I change the reselution. I'm using the offical 7" pi screen.

Thanks, Raiv3n

ngoldack avatar Jul 25 '18 12:07 ngoldack

You can get it to scale with these steps:

  1. Make your own copy of the file at /opt/octoprint-tft/styles/default/style.css. Edit it to modify the styling. I updated font sizes so they look decent on the 7" Pi screen. See the code fragment below for the lines I inserted at the top of the file:
  2. Note the full path of your edited style.css. Into the same directory, copy over the images/ directory (recursively with all its contents) from /opt/octoprint-tft/styles/default/.
  3. Open /etc/octoprint-tft-environment and set the variable OCTOPRINT_TFT_STYLE_PATH to the path (just the full path to the directory in which your style.css and images/ sit). You may need to do this with sudo so you have write permission on the file.
  4. Reboot the pi.
button {
    font: 24px Sans;
}

label {
    font: 18px Sans;
}

progressbar {
    font: 18px Sans;
    padding: 10px;
}

ppamidimarri avatar Aug 01 '18 01:08 ppamidimarri

There is a problem in the main() function with the variables, height & width. Golang is a "pass-by-value" language. The 'getSize()' function will not alter the inherent value of the variables 'height & width' as written. Because of the scope of those variables, any changes accomplished in 'getSize()' are lost when go returns to main().

The fix for this problem is to declare 'height & width' like this: var ( BaseURL string APIKey string ConfigFile string Resolution string height int width int ) or use pointers

tkocou avatar Jun 09 '19 22:06 tkocou