Skip to content

Commit

Permalink
feat(widget/github): enhance menu and icon configuration options
Browse files Browse the repository at this point in the history
Updated the widget's menu and icon settings to allow for more customization. The menu now supports properties like blur, round corners, and alignment, while icons for issues, pull requests, releases, discussions, and the GitHub logo have been added for better visual representation.
  • Loading branch information
amnweb committed Jan 15, 2025
1 parent 73b1d73 commit 3ddbc4f
Show file tree
Hide file tree
Showing 2 changed files with 244 additions and 140 deletions.
96 changes: 82 additions & 14 deletions src/core/validation/widgets/yasb/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@
'update_interval': 600,
'token': "",
'tooltip': True,
'max_notification':20,
'max_notification':30,
'only_unread': False,
'max_field_size': 100,
'menu_width': 400,
'menu_height': 400,
'menu_offset': 240,
'menu': {
'blur': True,
'round_corners': True,
'round_corners_type': 'normal',
'border_color': 'System',
'alignment': 'right',
'direction': 'down',
'distance': 6
},
'icons': {
'issue': '\uf41b',
'pull_request': '\uea64',
'release': '\uea84',
'discussion': '\uf442',
'default': '\uea84',
'github_logo': '\uea84'
},
'animation': {
'enabled': True,
'type': 'fadeInOut',
Expand Down Expand Up @@ -54,17 +68,71 @@
'type': 'integer',
'default': DEFAULTS['max_field_size']
},
'menu_width': {
'type': 'integer',
'default': DEFAULTS['menu_width']
},
'menu_height': {
'type': 'integer',
'default': DEFAULTS['menu_height']
'menu': {
'type': 'dict',
'required': False,
'schema': {
'blur': {
'type': 'boolean',
'default': DEFAULTS['menu']['blur']
},
'round_corners': {
'type': 'boolean',
'default': DEFAULTS['menu']['round_corners']
},
'round_corners_type': {
'type': 'string',
'default': DEFAULTS['menu']['round_corners_type']
},
'border_color': {
'type': 'string',
'default': DEFAULTS['menu']['border_color']
},
'alignment': {
'type': 'string',
'default': DEFAULTS['menu']['alignment']
},
'direction': {
'type': 'string',
'default': DEFAULTS['menu']['direction']
},
'distance': {
'type': 'integer',
'default': DEFAULTS['menu']['distance']
}
},
'default': DEFAULTS['menu']
},
'menu_offset': {
'type': 'integer',
'default': DEFAULTS['menu_offset']
'icons': {
'type': 'dict',
'required': False,
'schema': {
'issue': {
'type': 'string',
'default': DEFAULTS['icons']['issue']
},
'pull_request': {
'type': 'string',
'default': DEFAULTS['icons']['pull_request']
},
'release': {
'type': 'string',
'default': DEFAULTS['icons']['release']
},
'discussion': {
'type': 'string',
'default': DEFAULTS['icons']['discussion']
},
'default': {
'type': 'string',
'default': DEFAULTS['icons']['default']
},
'github_logo': {
'type': 'string',
'default': DEFAULTS['icons']['github_logo']
}
},
'default': DEFAULTS['icons']
},
'animation': {
'type': 'dict',
Expand Down
Loading

0 comments on commit 3ddbc4f

Please sign in to comment.