slint/examples/opengl_texture/scene.slint
Aurindam Jana e01e9685be
Update Slint logo folder with new design (#3432)
This PR updates the logos and branding guideline of Slint to match the new website design. The new logos are a 1:1 replacement of the old logos except for the circular logo. In the new logo design, there isn't a separate circular logo, as the square logo with circular crop can be used. Further, the logo folder also contains logos in CMYK for use in printed materials. The PMS is just the color value in the naming and can be used where Pantome colors are required. The README has been updated to explain which logos to use when as well as the Slint "blue" color.
2023-09-11 16:41:06 +02:00

71 lines
2.2 KiB
Text

// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: MIT
import { Slider, GroupBox, HorizontalBox, VerticalBox, GridBox } from "std-widgets.slint";
export component App inherits Window {
preferred-width: 500px;
preferred-height: 600px;
title: "Slint OpenGL Texture Example";
icon: @image-url("../../logo/slint-logo-small-light.png");
in property <image> texture <=> image.source;
out property <int> requested-texture-width: image.width/1phx;
out property <int> requested-texture-height: image.height/1phx;
out property <float> selected-red <=> red.value;
out property <float> selected-green <=> green.value;
out property <float> selected-blue <=> blue.value;
VerticalBox {
Text {
text: "This text is rendered using Slint. The rotating cube below is rendered into an OpenGL texture.";
wrap: word-wrap;
}
image := Image {
preferred-width: 640px;
preferred-height: 640px;
width: 100%;
//height: 100%;
}
GroupBox {
title: "Cube Color Controls";
GridBox {
Row {
Text {
text: "Red:";
vertical-alignment: center;
}
red := Slider {
minimum: 0.1;
maximum: 1.0;
value: 0.2;
}
}
Row {
Text {
text: "Green:";
vertical-alignment: center;
}
green := Slider {
minimum: 0.1;
maximum: 1.0;
value: 0.5;
}
}
Row {
Text {
text: "Blue:";
vertical-alignment: center;
}
blue := Slider {
minimum: 0.1;
maximum: 1.0;
value: 0.9;
}
}
}
}
}
}