mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
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:
parent
dff5d8ab25
commit
6a1cd307ff
1 changed files with 2 additions and 2 deletions
|
@ -33,13 +33,13 @@ var editor_documents: Map<string, ModelAndViewState> = new Map;
|
|||
let hello_world = `
|
||||
import { SpinBox, Button, CheckBox, Slider, GroupBox } from "sixtyfps_widgets.60";
|
||||
export Demo := Window {
|
||||
width: 300px;
|
||||
width: 300px; // Width in logical pixels. All 'px' units are automatically scaled with screen resolution.
|
||||
height: 300px;
|
||||
t:= Text {
|
||||
text: "Hello World";
|
||||
font-size: 24px;
|
||||
}
|
||||
Image{
|
||||
Image {
|
||||
y: 50px;
|
||||
source: img!"https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/resources/logo_scaled.png";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue