parch-welcome/ui/pages/globals.slint
Sohrab Behdani f35077f109
New Parch Welcome written in slint and rust (#16)
* new slint build

* new slint build + desktop files

* fixed the pkgbuild
2024-04-12 17:14:01 +00:00

26 lines
769 B
Text

export global Globals {
callback close();
callback openUrl(string);
callback startInstaller();
// True Stand for Light Theme
in-out property <bool> currentTheme: true;
// True Stand for PersianApp
in-out property <bool> isEnglishPage: true;
out property <color> lightTheme: #FAFAFA;
out property <color> darkTheme: #323232;
out property <color> primaryDark:#242424;
in-out property <color> themeStatus: primaryDark;
public function switchTheme(){
currentTheme = !currentTheme;
if themeStatus == primaryDark {
themeStatus = Colors.white;
} else {
themeStatus = primaryDark;
}
}
public function changeLang(){
isEnglishPage = !isEnglishPage;
}
}