[fractal/fractal-next] content: Use LabelWithWidgets to display inviter
- From: Julian Sparber <jsparber src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/fractal-next] content: Use LabelWithWidgets to display inviter
- Date: Mon, 31 May 2021 14:24:38 +0000 (UTC)
commit 47fc7cc383bc4bb280ea38fce39225e75b422328
Author: Julian Sparber <julian sparber net>
Date: Mon May 31 11:23:43 2021 +0200
content: Use LabelWithWidgets to display inviter
data/resources/ui/content-invite.ui | 12 +++---------
src/session/content/invite.rs | 5 ++---
2 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/data/resources/ui/content-invite.ui b/data/resources/ui/content-invite.ui
index 50fae5d6..0cb680c1 100644
--- a/data/resources/ui/content-invite.ui
+++ b/data/resources/ui/content-invite.ui
@@ -80,10 +80,10 @@
</object>
</child>
<child>
- <object class="GtkBox">
- <property name="halign">center</property>
+ <object class="LabelWithWidgets">
+ <property name="label" translatable="yes"><widget> invited you</property>
<child>
- <object class="Pill" id="inviter">
+ <object class="Pill">
<binding name="user">
<lookup name="inviter">
<lookup name="room">ContentInvite</lookup>
@@ -91,12 +91,6 @@
</binding>
</object>
</child>
- <child>
- <object class="GtkLabel">
- <!-- Translators: the space at the beginning is there on purpose -->
- <property name="label" translatable="yes"> invited you</property>
- </object>
- </child>
</object>
</child>
<child>
diff --git a/src/session/content/invite.rs b/src/session/content/invite.rs
index a04fdaca..557aff33 100644
--- a/src/session/content/invite.rs
+++ b/src/session/content/invite.rs
@@ -1,5 +1,5 @@
use crate::{
- components::{Pill, SpinnerButton},
+ components::{LabelWithWidgets, Pill, SpinnerButton},
session::{categories::CategoryType, room::Room},
};
use adw::subclass::prelude::*;
@@ -23,8 +23,6 @@ mod imp {
#[template_child]
pub headerbar: TemplateChild<adw::HeaderBar>,
#[template_child]
- pub inviter: TemplateChild<adw::HeaderBar>,
- #[template_child]
pub room_topic: TemplateChild<gtk::Label>,
#[template_child]
pub accept_button: TemplateChild<SpinnerButton>,
@@ -41,6 +39,7 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
Pill::static_type();
SpinnerButton::static_type();
+ LabelWithWidgets::static_type();
Self::bind_template(klass);
klass.set_accessible_role(gtk::AccessibleRole::Group);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]