make warning red

This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-08-14 16:11:53 +03:00
parent ece1bda657
commit 4978bbd6d6
4 changed files with 16 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "pika-drivers" name = "pika-drivers"
version = "0.4.2" version = "0.4.3"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -11,7 +11,12 @@ then
else else
if [[ $1 == "description" ]] if [[ $1 == "description" ]]
then then
if echo "$2" | grep mesa-git &> /dev/null
then
printf "WARNING: THIS DRIVER IS EXPERMINTAL USE AT YOUR OWN RISK!\n$(apt-cache show mesa-git | grep 'Description*' | cut -d":" -f2 | head -n1)"
else
apt-cache show $2 | grep 'Description*' | cut -d":" -f2 | head -n1 apt-cache show $2 | grep 'Description*' | cut -d":" -f2 | head -n1
fi
else else
if [[ $1 == "device" ]] if [[ $1 == "device" ]]
then then

View File

@ -415,6 +415,9 @@ fn get_drivers(main_window: &gtk::Box, loading_box: &gtk::Box, ubuntu_drivers_li
.justify(Justification::Left) .justify(Justification::Left)
.build(); .build();
driver_middle_part_description_label.add_css_class("midLabel"); driver_middle_part_description_label.add_css_class("midLabel");
if driver_name = ("mesa-git") {
driver_middle_part_description_label.add_css_class("midLabelWARN");
}
driver_version_icon.set_tooltip_text(Some(&String::from_utf8(command_version_label.stdout).unwrap())); driver_version_icon.set_tooltip_text(Some(&String::from_utf8(command_version_label.stdout).unwrap()));
driver_device_icon.set_tooltip_text(Some(&String::from_utf8(command_device_label.stdout).unwrap())); driver_device_icon.set_tooltip_text(Some(&String::from_utf8(command_device_label.stdout).unwrap()));
driver_middle_part_description_label.set_text(&String::from_utf8(command_description_label.stdout).unwrap()); driver_middle_part_description_label.set_text(&String::from_utf8(command_description_label.stdout).unwrap());

View File

@ -2,6 +2,12 @@
font-size: 14px; font-size: 14px;
} }
.midLabelWARN {
font-size: 14px;
color: red;
}
.startLabel { .startLabel {
font-size: 14px; font-size: 14px;
} }