Skip to content

Commit d2700ca

Browse files
committed
Adapt the opengl_overlay examples to Slint a bit more
1 parent 4115af8 commit d2700ca

File tree

2 files changed

+38
-9
lines changed

2 files changed

+38
-9
lines changed

examples/opengl_underlay/index.html

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,38 @@
1616
<title>SixtyFPS OpenGL Underlay Example (Web Assembly version)</title>
1717
</head>
1818
<style>
19+
* {
20+
box-sizing: border-box;
21+
}
22+
23+
body {
24+
background: radial-gradient(108.19% 165.77% at 1.67% -32.72%, #2C2F36 10%, #040708 96.35%);
25+
color: white;
26+
text-align: center;
27+
max-width: 1100px;
28+
margin: 0px auto;
29+
min-height: 100vh;
30+
}
31+
32+
p:not(.links) {
33+
text-align: left;
34+
padding: 1ex 5ex;
35+
}
36+
37+
h1 {
38+
text-align: left;
39+
padding: 0.5ex 1ex
40+
}
41+
42+
a {
43+
color: #DBFF00
44+
}
45+
46+
a:not(:hover) {
47+
text-decoration: none;
48+
}
49+
50+
1951
canvas:focus {
2052
outline: none;
2153
touch-action: none;
@@ -35,18 +67,15 @@
3567
</style>
3668

3769
<body>
38-
<p>This is the <a href="https://sixtyfps.io">SixtyFPS</a> OpenGL Underlay example compiled to WebAssembly. It demonstrates an OpenGL rendered scene under a SixtyFPS scene.</p>
70+
<p>This is the <a href="https://sixtyfps.io">Slint</a> OpenGL Underlay example compiled to WebAssembly. It
71+
demonstrates an OpenGL rendered scene under a Slint scene.</p>
3972
<div id="spinner" style="position: relative;">
4073
<div class="spinner">Loading...</div>
4174
</div>
4275
<canvas id="canvas" width="640" height="480"></canvas>
43-
<p>
44-
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/opengl_underlay/scene.60">
45-
View Source Code on GitHub</a> -
46-
<a
47-
href="https://sixtyfps.io/editor?load_url=https://raw.githubusercontent.com/sixtyfpsui/sixtyfps/master/examples/opengl_underlay/scene.60">
48-
Edit in the online code editor
49-
</a>
76+
<p class="links">
77+
<a href="https://github.com/sixtyfpsui/sixtyfps/blob/master/examples/opengl_underlay/">
78+
View Source Code on GitHub</a>
5079
</p>
5180
<script type="module">
5281
import init from './pkg/opengl_underlay.js';

examples/opengl_underlay/scene.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ScrollView, Button, CheckBox, SpinBox, Slider, GroupBox, LineEdit, Stan
77
App := Window {
88
preferred-width: 500px;
99
preferred-height: 600px;
10-
title: "Slnt OpenGL Underlay Example";
10+
title: "Slint OpenGL Underlay Example";
1111
icon: @image-url("../../logo/slint-logo-square-light-128x128.png");
1212

1313
property <bool> rotation-enabled <=> apply-rotation.checked;

0 commit comments

Comments
 (0)