mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
faster
This commit is contained in:
@@ -382,9 +382,12 @@ class OptionList(ScrollView, can_focus=True):
|
||||
options = console.options
|
||||
padding = self.get_component_styles("option-list--option").padding
|
||||
padding_width = padding.width
|
||||
return max(
|
||||
Measurement.get(console, options, option.prompt).maximum + padding_width
|
||||
for option in self._options
|
||||
return (
|
||||
max(
|
||||
Measurement.get(console, options, option.prompt).maximum
|
||||
for option in self._options
|
||||
)
|
||||
+ padding_width
|
||||
)
|
||||
|
||||
def get_content_height(self, container: Size, viewport: Size, width: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user