Skip to content

Commit 9b76f5f

Browse files
sumanthvraoneiljp
authored andcommitted
bugfix: views: Fix PopUpConfirmationView width to be left panel width.
With 3426854 we adjusted the left panel width but the PopUpConfimationView box width was fixed. With this we now set the popup width based on the LEFT_WIDTH width set in UI. Tests amended.
1 parent 5801358 commit 9b76f5f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/ui/test_ui_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ class TestPopUpConfirmationView:
996996
@pytest.fixture
997997
def popup_view(self, mocker, stream_button):
998998
self.controller = mocker.Mock()
999+
self.controller.view.LEFT_WIDTH = 27
9991000
self.callback = mocker.Mock()
10001001
self.list_walker = mocker.patch(VIEWS + ".urwid.SimpleFocusListWalker",
10011002
return_value=[])

zulipterminal/ui_tools/views.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,8 @@ def __init__(self, controller: Any, question: Any,
738738
[question, urwid.Divider(), wrapped_widget]
739739
)))
740740
urwid.Overlay.__init__(self, prompt, self.controller.view,
741-
align="left", valign="top", width=26,
741+
align="left", valign="top",
742+
width=self.controller.view.LEFT_WIDTH+1,
742743
height=8)
743744

744745
def exit_popup_yes(self, args: Any) -> None:

0 commit comments

Comments
 (0)