Skip to content

got the download all good but now #3

Open

Description

@rdeneault7

The layout on my widget is weird here is a picture so see what's going on ![Uploading 105425142...]

Activity

  1. rdeneault7 commented on Jan 21, 2021

    @rdeneault7
    Author

    image

  2. ajatkj commented on Jan 22, 2021

    @ajatkj
    Owner

    Hi,

    The layout co-ordinates need to be changed for different phones because the size and resolution is different. I have done it on iPhone X so the co-ordinates might not be accurate for your phone. But there is a simple way to fix this-

    Locate the variable layout in the code and the y co-ordinate for each of these elements.

    var layout = {
      // field: [key,prefix,suffix,x,y,width,height,font,color,align]
      lowTemp: {key: "low", prefix: null, suffix: "temperature", x: "left_margin", y: 375, w: 100, h: 75, font: "small", color: "light", align: "left", hide: 1},
      highTemp: {key: "high", prefix: null, suffix: "temperature", x: "left_margin", y: 200, w: 100, h: 75, font: "small", color: "light", align: "left", hide: 1},
      temp: {key: "temp", prefix: null, suffix: "temperature", x: -100, y: 200, w: 100, h: 50, font: "medium", color: "light",  align: "center"},
      description: {key: "desc", prefix: null, suffix: null, x: "center", y: 650, w: "half", h: 30, font: "extraSmall", color: "light", align: "center"},
      location: {key: "loc", prefix: null, suffix: null, x: "center", y: 690, w: "half", h: 30, font: "extraSmall", color: "light", align: "center"},
      icon: {key: "icon", prefix: null, suffix: null, x: -100, y: 120, w: 100, h: 100, font: null, color: "light", align: "center"},
      wind: {key: "wind", prefix: "🌬️", suffix: "speed", x: -100, y: 260, w: 120, h: 50, font: "extraSmall", color: "light",  align: "center"},
      sunrise: {key: "sunrise", prefix: "🔆 ", suffix: "", x: -100, y: 310, w: 120, h: 50, font: "extraSmall", color: "light",  align: "center", hide: 2},
      sunset: {key: "sunset", prefix: "🔅 ", suffix: "", x: -100, y: 310, w: 120, h: 50, font: "extraSmall", color: "light",  align: "center", hide: 2}
    };
    

    You can change other values as well based on where you need to place each of these elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions