|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/idlelib/__pycache__/ |
U
@��gk � @ sp d Z ddlZddlZddlZG dd� de�ZG dd� d�Zdd� Zd d
� Ze dkrlddl
mZ ed
ddd� dS )z Zoom a window to maximum height.� Nc @ s e Zd ZdS )�WmInfoGatheringErrorN)�__name__�
__module__�__qualname__� r r �1/opt/cppython/lib/python3.8/idlelib/zoomheight.pyr s r c @ s2 e Zd Zi Zdd� Zd
dd�Zdd� Zdd � ZdS )�
ZoomHeightc C s || _ | j j| _d S )N)�editwin�top)�selfr r r r �__init__ s zZoomHeight.__init__Nc C sD | � � }|d kr| j�� n$|r$dnd}| jjdd|� d�d� dS )NZRestoreZZoom�optionsz* Heightz Height)Zmenu�indexZlabel�break)�zoom_heightr
Zbellr Zupdate_menu_label)r �event�zoomedZmenu_statusr r r �zoom_height_event s
�zZoomHeight.zoom_height_eventc C s~ | j }t|�\}}}}|�� dkr&d S z| �� \}}W n tk
rL Y d S X ||krlt|||||f� dS |�d� dS d S )N�normalT� F)r
�get_window_geometry�wm_state�get_max_height_and_y_coordr �set_window_geometry�wm_geometry)r r
�widthZheight�x�y� maxheight�maxyr r r r ! s
zZoomHeight.zoom_heightc C s | j }|�� |�� f}|| jkr�|�� }z|�d� W n tjk
rT td��Y nX |�� t |�\}}}}t
jdkr|d}|�� }|�d� |�� t |�} | d d� |f }
t
||
� |�� |�� }||| 7 }||f| j|<