Replies: 1 comment 2 replies
-
I do not see a smoking gun in the slint code. Did you check the callbacks into your business logic? They apparently generate the SVG commands you render. Does the wind direction graph return the same size output as the others? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to overlay three graphs on top of each other, each in a different colour. To do this, I'm using Path elements for each graph, placing them inside a rectangle. It looks like this:
`import { Button, GridBox, HorizontalBox, LineEdit, VerticalBox } from "std-widgets.slint";
export component AppWindow inherits Window {
in-out property file-name <=> file-line-edit.text;
in property start-date: "Jan 1, 1962 00:00:00";
in property end-date: "Dec 31, 2100 23:59:59";
in property detail-start-date: "Jan 1, 1962 00:00:00";
in property detail-end-date: "Dec 31, 2100 23:59:39";
in property min-boat-speed: 0;
in property max-boat-speed: 30;
in property min-wind-speed: 0;
in property max-wind-speed: 30;
}
You can see from the following screen shot that the blue box is a lot smaller than the other two, even though all three have their height and width set to the (same) parent's height and width minus 2 pixels.
the first commands of each SVG are format!("M 0 {1} L 0 0 L {1} 0 L {0} {1} L 0 {1}", height, width); I've verified that the commands really are using height of the rectangle - 2 pixels and width of the rectangle minus 2 pixels.
Any idea why one of the paths are so small? (all three SVG paths use the same preamble)
Beta Was this translation helpful? Give feedback.
All reactions