Skip to content

Commit

Permalink
Fix padding while in initialization process
Browse files Browse the repository at this point in the history
  • Loading branch information
1fadi committed May 7, 2023
1 parent d88b00f commit a4966e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibattery.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ class Battery(base._Widget):
),
]

def __init__(self, **config):
def __init__(self, padding=None, **config):
base._Widget.__init__(self, bar.CALCULATED, **config)
self.add_defaults(Battery.defaults)

self.HEIGHT, self.BAR_WIDTH = self.size # battery bar
self.padding = padding if padding else 2
self.margin = 2
self.length = self.padding * 2 + self.BAR_WIDTH + 7.5 + self.margin * 2

Expand Down

0 comments on commit a4966e3

Please sign in to comment.