user-account: Use a stack in user-icon to keep the same size
This fixes the undesired jumps (resizes) while switching between "Your Account" and any other account. https://bugzilla.gnome.org/show_bug.cgi?id=778458
This commit is contained in:
parent
ffb2aaabe7
commit
92e99f677f
2 changed files with 5 additions and 16 deletions
|
@ -291,9 +291,8 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<object class="GtkStack" id="user-icon">
|
||||
<property name="visible">True</property>
|
||||
<property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
|
||||
<property name="halign">GTK_ALIGN_END</property>
|
||||
<child>
|
||||
<object class="UmUserImage" id="user-icon-image">
|
||||
|
@ -307,11 +306,6 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="user-icon-button">
|
||||
|
@ -332,11 +326,6 @@
|
|||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -1269,8 +1269,8 @@ on_permission_changed (GPermission *permission,
|
|||
}
|
||||
|
||||
if (is_authorized || self_selected) {
|
||||
gtk_widget_show (get_widget (d, "user-icon-button"));
|
||||
gtk_widget_hide (get_widget (d, "user-icon-image"));
|
||||
gtk_stack_set_visible_child (GTK_STACK (get_widget (d, "user-icon")),
|
||||
get_widget (d, "user-icon-button"));
|
||||
|
||||
gtk_widget_set_sensitive (get_widget (d, "account-language-button"), TRUE);
|
||||
remove_unlock_tooltip (get_widget (d, "account-language-button"));
|
||||
|
@ -1285,8 +1285,8 @@ on_permission_changed (GPermission *permission,
|
|||
remove_unlock_tooltip (get_widget (d, "last-login-button"));
|
||||
}
|
||||
else {
|
||||
gtk_widget_hide (get_widget (d, "user-icon-button"));
|
||||
gtk_widget_show (get_widget (d, "user-icon-image"));
|
||||
gtk_stack_set_visible_child (GTK_STACK (get_widget (d, "user-icon")),
|
||||
get_widget (d, "user-icon-image"));
|
||||
|
||||
gtk_widget_set_sensitive (get_widget (d, "account-language-button"), FALSE);
|
||||
add_unlock_tooltip (get_widget (d, "account-language-button"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue