mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
Show GPU model when card model is not available
This commit is contained in:
@@ -24,7 +24,7 @@ impl InformationPage {
|
||||
container.set_margin_end(5);
|
||||
container.set_margin_bottom(5);
|
||||
container.set_margin_top(5);
|
||||
|
||||
|
||||
container.set_column_homogeneous(true);
|
||||
|
||||
container.set_row_spacing(7);
|
||||
@@ -47,7 +47,6 @@ impl InformationPage {
|
||||
|
||||
container.attach(&gpu_name_label, 2, 0, 3, 1);
|
||||
|
||||
|
||||
container.attach(
|
||||
&{
|
||||
let label = Label::new(Some("GPU Manufacturer:"));
|
||||
@@ -76,12 +75,11 @@ impl InformationPage {
|
||||
2,
|
||||
1,
|
||||
);
|
||||
|
||||
|
||||
let vbios_version_label = Label::new(None);
|
||||
vbios_version_label.set_halign(Align::Start);
|
||||
|
||||
|
||||
container.attach(&vbios_version_label, 2, 2, 3, 1);
|
||||
|
||||
|
||||
container.attach(
|
||||
&{
|
||||
@@ -95,12 +93,11 @@ impl InformationPage {
|
||||
1,
|
||||
);
|
||||
|
||||
let driver_label = Label::new( None);
|
||||
let driver_label = Label::new(None);
|
||||
driver_label.set_halign(Align::Start);
|
||||
|
||||
container.attach(&driver_label, 2, 3, 3, 1);
|
||||
|
||||
|
||||
|
||||
container.attach(
|
||||
&{
|
||||
let label = Label::new(Some("VRAM Size:"));
|
||||
@@ -113,11 +110,10 @@ impl InformationPage {
|
||||
1,
|
||||
);
|
||||
|
||||
let vram_size_label = Label:: new(None);
|
||||
let vram_size_label = Label::new(None);
|
||||
vram_size_label.set_halign(Align::Start);
|
||||
|
||||
container.attach(&vram_size_label, 2, 4, 3, 1);
|
||||
|
||||
|
||||
container.attach(
|
||||
&{
|
||||
@@ -135,7 +131,6 @@ impl InformationPage {
|
||||
link_speed_label.set_halign(Align::Start);
|
||||
|
||||
container.attach(&link_speed_label, 2, 5, 3, 1);
|
||||
|
||||
|
||||
let vulkan_info_frame = VulkanInfoFrame::new();
|
||||
container.attach(&vulkan_info_frame.container, 0, 6, 5, 1);
|
||||
@@ -155,31 +150,28 @@ impl InformationPage {
|
||||
pub fn set_info(&self, gpu_info: &GpuInfo) {
|
||||
self.gpu_name_label.set_markup(&format!(
|
||||
"<b>{}</b>",
|
||||
gpu_info.vendor_data.card_model.clone().unwrap_or_default()
|
||||
match &gpu_info.vendor_data.card_model {
|
||||
Some(card_model) => card_model.clone(),
|
||||
None => gpu_info.vendor_data.gpu_model.clone().unwrap_or_default(),
|
||||
}
|
||||
));
|
||||
self.gpu_manufacturer_label.set_markup(&format!(
|
||||
"<b>{}</b>",
|
||||
gpu_info.vendor_data.card_vendor.clone().unwrap_or_default()
|
||||
));
|
||||
self.vbios_version_label.set_markup(&format!(
|
||||
"<b>{}</b>",
|
||||
gpu_info.vbios_version
|
||||
));
|
||||
self.driver_label.set_markup(&format!(
|
||||
"<b>{}</b>",
|
||||
gpu_info.driver
|
||||
));
|
||||
self.vram_size_label.set_markup(&format!(
|
||||
"<b>{}</b>",
|
||||
gpu_info.vram_size
|
||||
));
|
||||
self.vbios_version_label
|
||||
.set_markup(&format!("<b>{}</b>", gpu_info.vbios_version));
|
||||
self.driver_label
|
||||
.set_markup(&format!("<b>{}</b>", gpu_info.driver));
|
||||
self.vram_size_label
|
||||
.set_markup(&format!("<b>{}</b>", gpu_info.vram_size));
|
||||
self.link_speed_label.set_markup(&format!(
|
||||
"<b>{} x{}</b>",
|
||||
gpu_info.link_speed, gpu_info.link_width
|
||||
));
|
||||
|
||||
|
||||
self.vulkan_info_frame.set_info(&gpu_info.vulkan_info);
|
||||
|
||||
|
||||
self.container.show_all();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user