Skip to content

Commit

Permalink
Allow 'Scale' in icon theme per-directory sections
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Feb 2, 2018
1 parent c80f5ce commit 056dbc1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xdg/IconTheme.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ def getThreshold(self, directory):
else:
return 2

def getScale(self, directory):
value = self.get('Scale', type="integer", group=directory)
return value or 1

# validation stuff
def checkExtras(self):
# header
Expand Down Expand Up @@ -168,6 +172,8 @@ def checkKey(self, key, value, group):
self.checkValue(key, value, type="integer")
if self.type != "Threshold":
self.errors.append("Key 'Threshold' give, but Type is %s" % self.type)
elif key == "Scale":
self.checkValue(key, value, type="integer")
elif re.match("^X-[a-zA-Z0-9-]+", key):
pass
else:
Expand Down

0 comments on commit 056dbc1

Please sign in to comment.