version badges
This commit is contained in:
parent
243a58ac6f
commit
575b713b2c
@ -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()
|
||||
|
@ -48,4 +48,9 @@
|
||||
|
||||
.success-color-text {
|
||||
color: @success_bg_color;
|
||||
}
|
||||
|
||||
.size-20-bold-text {
|
||||
font-weight: 800;
|
||||
font-size: 20px;
|
||||
}
|
Loading…
Reference in New Issue
Block a user