@@ -105,22 +105,6 @@ def set_bg_color(self, color: int, opa: int, part: int) -> None:
105
105
time .sleep (0.01 )
106
106
self .set_style_bg_opa (opa , part )
107
107
108
- @staticmethod
109
- def set_line_color (self , color : int , opa : int , part : int = lv .PART .MAIN ) -> None :
110
- """Set the line color and opacity for a given part of the object.
111
-
112
- :param int color: The color to set, can be an integer (hex) or a lv.color object.
113
- :param int opa: The opacity level (0-255).
114
- :param int part: The part of the object to apply the style to (e.g., lv.PART.MAIN).
115
- :return: None
116
- """
117
- if isinstance (color , int ):
118
- color = lv .color_hex (color )
119
-
120
- self .set_style_line_color (color , part )
121
- time .sleep (0.01 )
122
- self .set_style_line_opa (opa , part )
123
-
124
108
@staticmethod
125
109
def set_bg_grad_color (self , color , opa , grad_color , grad_opd , grad_dir , part : int ) -> None :
126
110
"""Set the background gradient color of the bar.
@@ -168,3 +152,13 @@ def set_border_color(self, color: int, opa: int, part: int):
168
152
self .set_style_border_color (color , part )
169
153
time .sleep (0.01 )
170
154
self .set_style_border_opa (opa , part )
155
+
156
+ @staticmethod
157
+ def get_display_size (self ):
158
+ """Get the display size.
159
+
160
+ :return: A tuple containing the width and height of the display.
161
+ :rtype: tuple
162
+ """
163
+ scr = lv .screen_active ()
164
+ return scr .get_width (), scr .get_height ()
0 commit comments