
    Jek                     2    d Z ddlmZ ddlZ G d de      Zy)z
Base variable explorer dialog
    )QDialogNc                   2     e Zd ZddZ	 	 ddZ fdZ xZS )
BaseDialogc                     t        j                  | |       t        j                  j	                         }|j
                  j                  d       | j                  |j                                y )Nz3px 15px 3px 15px)padding)	r   __init__	qstylizerstyle
StyleSheetQPushButton	setValuessetStyleSheettoString)selfparentcsss      T/usr/lib/python3/dist-packages/spyder/plugins/variableexplorer/widgets/basedialog.pyr   zBaseDialog.__init__   sV    v& oo((*!!' 	" 	
 	3<<>*    c                    t        |j                         |z        }t        |j                         |z        }| j                  ||       t        |j	                         j                         | j                         dz  z
        }t        |j	                         j                         | j                         dz  z
        }| j                  ||       y)z
        Update width and height using an updated screen geometry.
        Use a ratio for the width and height of the dialog.
           N)intwidthheightresizecenterxymove)r   screen_geometrywidth_ratioheight_ratioscreen_widthscreen_heightr   r   s           r   set_dynamic_width_and_heightz'BaseDialog.set_dynamic_width_and_height   s     ?002[@AO224|CDL-0 &&(**,tzz|a/??@&&(**,t{{}q/@@A		!Qr   c                    t         t        |           | j                         }|j	                         }|j                         }|j                         }| j                  |       |j                  j                  | j                         y N)
superr   showwindowwindowHandlescreengeometryr$   geometryChangedconnect)r   r)   r*   r+   r,   	__class__s        r   r(   zBaseDialog.show+   sk    j$$&**,$$&??$))(3&&t'H'HIr   r&   )      ?r0   )__name__
__module____qualname__r   r$   r(   __classcell__)r/   s   @r   r   r      s#    + IL25J Jr   r   )__doc__qtpy.QtWidgetsr   qstylizer.styler	   r    r   r   <module>r9      s    
 # "J "Jr   