Begin Slint UI
- Get started with Slint for UI - Experiment with basic window structure
This commit is contained in:
parent
b4162a7fc0
commit
d83c5a0aca
@ -10,3 +10,7 @@ reqwest = {version = "0.12.23", features = ["blocking", "json"] }
|
||||
toml = "0.9.7"
|
||||
dirs = "6.0.0"
|
||||
serde_json = "1.0.145"
|
||||
slint = "1.13"
|
||||
|
||||
[build-dependencies]
|
||||
slint-build = "1.13.1"
|
41
widget/ui/widget-popup.slint
Normal file
41
widget/ui/widget-popup.slint
Normal file
@ -0,0 +1,41 @@
|
||||
export component MainWindow inherits Window {
|
||||
always-on-top: true;
|
||||
height: 100px;
|
||||
width: 300px;
|
||||
no-frame: true;
|
||||
|
||||
weather_popup := Rectangle {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border-radius: 10px;
|
||||
border-color: #ffffff00;
|
||||
background: #7e7e7e36;
|
||||
|
||||
main_temp := Text {text: "24.4" + "°C";
|
||||
vertical-alignment: TextVerticalAlignment.center;
|
||||
x: 10px;
|
||||
y: 10px;
|
||||
color: #ffffff;
|
||||
font-family: "IosevkaTermSlab Nerd Font Mono";
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
weather_summary := Text {
|
||||
text: "Clear";
|
||||
x: 10px;
|
||||
y: 55px;
|
||||
font-size: 30px;
|
||||
font-family: "IosevkaTermSlab Nerd Font Mono";
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
city_name := Text {
|
||||
text: "England";
|
||||
x: 150px;
|
||||
y: 55px;
|
||||
font-size: 25px;
|
||||
font-family: "IosevkaTermSlab Nerd Font Mono";
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user