small fixes
This commit is contained in:
parent
a3349e673f
commit
6be5b84b24
4 changed files with 13 additions and 5 deletions
|
|
@ -11,9 +11,7 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="dots">
|
||||
<property name="orientation">horizontal</property>
|
||||
<property name="spacing">4</property>
|
||||
<object class="GtkLabel" id="dots">
|
||||
<property name="hexpand">true</property>
|
||||
<property name="halign">center</property>
|
||||
</object>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ pub struct DockItem {
|
|||
#[template_child]
|
||||
pub image: TemplateChild<gtk::Image>,
|
||||
#[template_child]
|
||||
pub dots: TemplateChild<gtk::Box>,
|
||||
pub dots: TemplateChild<gtk::Label>,
|
||||
pub drag_controller: OnceCell<DragSource>,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,12 @@ use gio::DesktopAppInfo;
|
|||
use gio::Icon;
|
||||
use gio::ListStore;
|
||||
use gtk4 as gtk;
|
||||
use gtk4::Align;
|
||||
use gtk4::Box;
|
||||
use gtk4::DragSource;
|
||||
use gtk4::IconTheme;
|
||||
use gtk4::Label;
|
||||
use gtk4::Orientation;
|
||||
mod imp;
|
||||
|
||||
use gtk::glib;
|
||||
|
|
@ -121,8 +124,11 @@ impl DockItem {
|
|||
}
|
||||
if let Ok(active_value) = app_info.property("active") {
|
||||
if let Ok(active) = active_value.get::<BoxedSearchResults>() {
|
||||
self_.dots.set_text("");
|
||||
for _ in active.0 {
|
||||
self_.dots.append(&Label::new(Some("·")));
|
||||
self_
|
||||
.dots
|
||||
.set_text(format!("{}{}", self_.dots.text(), " · ").as_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue