Skip to content
This repository has been archived by the owner on Nov 24, 2019. It is now read-only.

Won't scale #35

Open
ngoldack opened this issue Jul 25, 2018 · 2 comments
Open

Won't scale #35

ngoldack opened this issue Jul 25, 2018 · 2 comments

Comments

@ngoldack
Copy link

Hello,

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

Thanks,
Raiv3n

@ppamidimarri
Copy link

ppamidimarri commented Aug 1, 2018

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;
}

@tkocou
Copy link

tkocou commented Jun 9, 2019

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants