Another small tweak to the hello world

Since this will be the first thing many people see, add a small comment inline about
logical pixels.
This commit is contained in:
Simon Hausmann 2020-11-09 10:23:02 +01:00
parent dff5d8ab25
commit 6a1cd307ff

View file

@ -33,13 +33,13 @@ var editor_documents: Map<string, ModelAndViewState> = new Map;
let hello_world = ` let hello_world = `
import { SpinBox, Button, CheckBox, Slider, GroupBox } from "sixtyfps_widgets.60"; import { SpinBox, Button, CheckBox, Slider, GroupBox } from "sixtyfps_widgets.60";
export Demo := Window { export Demo := Window {
width: 300px; width: 300px; // Width in logical pixels. All 'px' units are automatically scaled with screen resolution.
height: 300px; height: 300px;
t:= Text { t:= Text {
text: "Hello World"; text: "Hello World";
font-size: 24px; font-size: 24px;
} }
Image{ Image {
y: 50px; y: 50px;
source: img!"https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/resources/logo_scaled.png"; source: img!"https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/resources/logo_scaled.png";
} }