Updates on Violet
This commit is contained in:
parent
9976e7f144
commit
b279b25846
4 changed files with 66 additions and 11 deletions
|
@ -204,22 +204,24 @@ class KuroTopBar(Bar):
|
|||
self.window.update_name()
|
||||
|
||||
def draw(self):
|
||||
if self.queued_draws == 0:
|
||||
self.qtile.call_soon(self._actual_draw)
|
||||
self.queued_draws += 1
|
||||
if not self.widgets:
|
||||
return
|
||||
if not self._draw_queued:
|
||||
self.future = self.qtile.call_soon(self._actual_draw)
|
||||
self._draw_queued = True
|
||||
|
||||
def _actual_draw(self):
|
||||
self.queued_draws = 0
|
||||
self._resize(self.length, self.widgets)
|
||||
self._draw_queued = False
|
||||
self._resize(self._length, self.widgets)
|
||||
for i in self.widgets:
|
||||
i.draw()
|
||||
if self.widgets:
|
||||
end = i.offset + i.length
|
||||
if end < self.length:
|
||||
if end < self._length:
|
||||
if self.horizontal:
|
||||
self.drawer.draw(offsetx=end, width=self.length - end)
|
||||
self.drawer.draw(offsetx=end, width=self._length - end)
|
||||
else:
|
||||
self.drawer.draw(offsety=end, height=self.length - end)
|
||||
self.drawer.draw(offsety=end, height=self._length - end)
|
||||
|
||||
self.theme.update_visualizers()
|
||||
|
||||
|
|
|
@ -139,6 +139,26 @@ class DualPaneTextboxBase(base._Widget):
|
|||
if self.layout_right:
|
||||
self.layout_right.font = value
|
||||
|
||||
@property
|
||||
def font_left(self):
|
||||
return self._font_left
|
||||
|
||||
@font_left.setter
|
||||
def font_left(self, value):
|
||||
self._font_left = value
|
||||
if self.layout_left:
|
||||
self.layout_left.font = value
|
||||
|
||||
@property
|
||||
def font_right(self):
|
||||
return self._font_right
|
||||
|
||||
@font_right.setter
|
||||
def font_right(self, value):
|
||||
self._font_right = value
|
||||
if self.layout_right:
|
||||
self.layout_right.font = value
|
||||
|
||||
@property
|
||||
def fontshadow(self):
|
||||
return self._fontshadow
|
||||
|
@ -1197,7 +1217,7 @@ class VolumeInfoWidget(DualPaneTextboxBase):
|
|||
"""Displays information about the volume"""
|
||||
orientations = base.ORIENTATION_HORIZONTAL
|
||||
defaults = [
|
||||
('update_interval', 10, 'The update interval in seconds.'),
|
||||
('update_interval', 5, 'The update interval in seconds.'),
|
||||
('text_pattern', "{percentage}%", 'The pattern for the text that is displayed.'),
|
||||
('charging_color', "#ffffff", "Color when battery is charging"),
|
||||
('normal_color', "#ffffff", "Color when value is normal"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue