Browse Source

editable-avatar: Make cutout style match less generic

fractal-6
Kévin Commaille 3 years ago
parent
commit
0c652f24d9
No known key found for this signature in database
GPG Key ID: 29A48C1F03620416
  1. 2
      data/resources/style.css
  2. 3
      src/components/editable_avatar.rs
  3. 4
      src/components/editable_avatar.ui

2
data/resources/style.css

@ -163,7 +163,7 @@ entry .inline-pill {
margin-bottom: -0.5em;
}
.cutout-button {
editable-avatar .cutout {
background-color: @window_bg_color;
border-radius: 9999px;
padding: 2px;

3
src/components/editable_avatar.rs

@ -65,8 +65,6 @@ mod imp {
#[template_child]
pub stack: TemplateChild<gtk::Stack>,
#[template_child]
pub button_remove_bin: TemplateChild<adw::Bin>,
#[template_child]
pub button_remove: TemplateChild<ActionButton>,
#[template_child]
pub button_edit: TemplateChild<ActionButton>,
@ -80,6 +78,7 @@ mod imp {
fn class_init(klass: &mut Self::Class) {
Self::bind_template(klass);
klass.set_css_name("editable-avatar");
klass.install_action("editable-avatar.edit-avatar", None, |obj, _, _| {
spawn!(clone!(@weak obj => async move {

4
src/components/editable_avatar.ui

@ -42,7 +42,7 @@
<child type="overlay">
<object class="AdwBin" id="button_remove_bin">
<style>
<class name="cutout-button" />
<class name="cutout" />
</style>
<property name="halign">end</property>
<property name="valign">start</property>
@ -57,7 +57,7 @@
<child type="overlay">
<object class="AdwBin">
<style>
<class name="cutout-button" />
<class name="cutout" />
</style>
<property name="visible" bind-source="ComponentsEditableAvatar" bind-property="editable" bind-flags="sync-create"/>
<property name="halign">end</property>

Loading…
Cancel
Save