gtkplacesviewrow: stop busy_spinner from offsetting the other widgets when visible
...by putting it in a stack. The busy_spinner and eject_button are mutually exclusive, but only the latter was coded to ensure that its visibility did not cause the rest of the row to reflow. By putting both widgets in a stack and setting child_visible on that, the row allocates enough space to show one - or none - at once, avoiding any misalignment. https://bugzilla.gnome.org/show_bug.cgi?id=772345 https://bugzilla.gnome.org/show_bug.cgi?id=772348
This commit is contained in:
		| @ -60,35 +60,42 @@ | ||||
|               </packing> | ||||
|             </child> | ||||
|             <child> | ||||
|               <object class="GtkButton" id="eject_button"> | ||||
|               <object class="GtkStack" id="mount_stack"> | ||||
|                 <property name="visible">1</property> | ||||
|                 <property name="halign">end</property> | ||||
|                 <property name="valign">center</property> | ||||
|                 <property name="tooltip-text" translatable="yes">Unmount</property> | ||||
|                 <property name="hhomogeneous">1</property> | ||||
|                 <property name="vhomogeneous">1</property> | ||||
|                 <child> | ||||
|                   <object class="GtkImage" id="eject_icon"> | ||||
|                   <object class="GtkButton" id="eject_button"> | ||||
|                     <property name="visible">1</property> | ||||
|                     <property name="icon-name">media-eject-symbolic</property> | ||||
|                     <property name="icon-size">1</property> | ||||
|                     <property name="halign">center</property> | ||||
|                     <property name="valign">center</property> | ||||
|                     <property name="tooltip-text" translatable="yes">Unmount</property> | ||||
|                     <child> | ||||
|                       <object class="GtkImage" id="eject_icon"> | ||||
|                         <property name="visible">1</property> | ||||
|                         <property name="icon-name">media-eject-symbolic</property> | ||||
|                         <property name="icon-size">1</property> | ||||
|                       </object> | ||||
|                     </child> | ||||
|                     <style> | ||||
|                       <class name="image-button"/> | ||||
|                       <class name="sidebar-button"/> | ||||
|                     </style> | ||||
|                   </object> | ||||
|                 </child> | ||||
|                 <child> | ||||
|                   <object class="GtkSpinner" id="busy_spinner"> | ||||
|                     <property name="visible">1</property> | ||||
|                     <property name="active">1</property> | ||||
|                     <property name="halign">center</property> | ||||
|                     <property name="valign">center</property> | ||||
|                   </object> | ||||
|                 </child> | ||||
|                 <style> | ||||
|                   <class name="image-button"/> | ||||
|                   <class name="sidebar-button"/> | ||||
|                 </style> | ||||
|               </object> | ||||
|               <packing> | ||||
|                 <property name="position">4</property> | ||||
|               </packing> | ||||
|             </child> | ||||
|             <child> | ||||
|               <object class="GtkSpinner" id="busy_spinner"> | ||||
|                 <property name="active">1</property> | ||||
|               </object> | ||||
|               <packing> | ||||
|                 <property name="position">5</property> | ||||
|               </packing> | ||||
|             </child> | ||||
|           </object> | ||||
|         </child> | ||||
|       </object> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 djb
					djb