alarm_app/alarm_widg/ui/widget-popup.slint
2026-02-27 11:54:04 +05:30

94 lines
2.6 KiB
Plaintext

export component MainWindow inherits Window {
in property <string> alarm_name: "Sample Alarm";
in property <string> alarm_time: "11:45AM";
in property <color> alarm_color: #232323;
in property <int> popup_width: 300;
in property <int> popup_height: 124;
in property <string> default_font: "IosevkaTermSlab Nerd Font Mono";
in property <string> alarm_icon: "🕓";
always-on-top: true;
no-frame: true;
width: popup_width *1px;
height: popup_height *1px;
background: transparent;
default-font-family: default_font;
Rectangle {
width: 100%;
height: 100%;
border-radius: 12px;
background: alarm_color;
drop-shadow-blur: 15px;
drop-shadow-color: #00000066;
GridLayout {
padding: 12px;
width: 100%;
// Icon
Rectangle {
row: 0;
col: 0;
colspan: 1;
rowspan: 3;
height: 100px;
width: 86px;
//background: #a13939;
Text {
height: 100%;
width: 100%;
vertical-alignment: center;
horizontal-alignment: center;
font-size: 85px;
text: root.alarm_icon;
color: white;
}
}
// Name
Rectangle {
row: 0;
col: 1;
colspan: 4;
rowspan: 1;
height: 40px;
//width: 211px;
width: 186px;
//min-width: 0px;
//background: #2d888f;
Text {
height: 100%;
width: 100%;
vertical-alignment: center;
horizontal-alignment: TextHorizontalAlignment.left;
font-size: 18px;
text: root.alarm_name;
color: white;
}
}
// Time
Rectangle {
row: 1;
col: 1;
colspan: 3;
rowspan: 2;
height: 60px;
width: 186px;
//background: #575757;
Text {
height: 100%;
width: 100%;
vertical-alignment: center;
horizontal-alignment: TextHorizontalAlignment.left;
font-size: 50px;
text: root.alarm_time;
color: white;
}
}
}
}
}