version badges

This commit is contained in:
Ward from fusion-voyager-3 2024-06-27 01:22:49 +03:00
parent 243a58ac6f
commit 575b713b2c
2 changed files with 19 additions and 4 deletions

View File

@ -42,16 +42,26 @@ impl ObjectImpl for AptPackageRow {
fn constructed(&self) {
self.parent_constructed();
let package_name = *self.package_name.borrow();
let package_arch= *self.package_arch.borrow();
let package_installed_version= *self.package_installed_version.borrow();
let package_candidate_version= *self.package_candidate_version.borrow();
// Bind label to number
// `SYNC_CREATE` ensures that the label will be immediately set
let obj = self.obj();
let prefix_box = gtk::Box::new(Orientation::Horizontal, 0);
prefix_box.append(&create_version_badge("1.0-100-pika1".to_string(), "1.1-101-pika1".to_string()));
let prefix_box = gtk::Box::new(Orientation::Vertical, 0);
let package_label = gtk::Label::builder()
.label(package_name)
.build();
package_label.add_css_class("size-20-bold-text");
prefix_box.append(package_installed_version, package_candidate_version);
obj.add_prefix(&prefix_box);
// Bind label to number
// `SYNC_CREATE` ensures that the label will be immediately set
//let obj = self.obj();
//obj.bind_property("package", &basic_expander_row_package_label, "label")
// .sync_create()

View File

@ -48,4 +48,9 @@
.success-color-text {
color: @success_bg_color;
}
.size-20-bold-text {
font-weight: 800;
font-size: 20px;
}