Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5a5801

Browse files
committed
feat(yasb): add offset_top and offset_left properties to menu configuration
This update introduces 'offset_top' and 'offset_left' properties to the menu configuration across multiple widgets, replacing the deprecated 'distance' property. This change enhances layout flexibility and positioning accuracy for the widgets.
1 parentc8e86e0 commitc5a5801

24 files changed

+149
-60
lines changed

‎docs/widgets/(Widget)-Brightness.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
|`auto_light_day_level`| int|`100`| The brightness level at which the widget switches to the day.|
1515
|`auto_light_night_start_time`| string|`"20:00"`| The time at which the night starts.|
1616
|`auto_light_night_end_time`| string|`"06:30"`| The time at which the night ends.|
17-
|`brightness_menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Menu settings for the widget.|
17+
|`brightness_menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Menu settings for the widget.|
1818
|`callbacks`| dict|`{'on_left': 'toggle_label', 'on_middle': 'do_nothing', 'on_right': 'do_nothing'}`| Callbacks for mouse events on the clock widget.|
1919
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
2020
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
@@ -49,7 +49,6 @@
4949
border_color:"System"
5050
alignment:"right"
5151
direction:"down"
52-
distance:6
5352
callbacks:
5453
on_left:"toggle_label"
5554
container_padding:
@@ -73,7 +72,8 @@
7372
- **border_color**: Set the border color for the menu (this option is not supported on Windows 10).
7473
- **alignment**: Set the alignment of the menu (left, right).
7574
- **direction**: Set the direction of the menu (up, down).
76-
- **distance**: Set the distance of the menu from the widget.
75+
- **offset_top**: Set the top offset of the menu.
76+
- **offset_left**: Set the left offset of the menu.
7777
- **auto_light:** Whether to automatically adjust the brightness icon based on the current brightness level.
7878
- **auto_light_icon:** The icon to use when the auto_light option is enabled.
7979
- **auto_light_night_level:** The brightness level at which the widget switches to the night.

‎docs/widgets/(Widget)-Clock.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
|`locale`| string|`""`| The locale to use for the clock. If not specified, it defaults to an empty string.|
99
|`update_interval`| integer|`1000`| The interval in milliseconds to update the clock. Must be between 0 and 60000.|
1010
|`timezones`| list|`[]`| A list of timezones to cycle through. Each timezone should be a valid timezone string.|
11-
|`calendar`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Calendar settings for the widget.|
11+
|`calendar`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Calendar settings for the widget.|
1212
|`callbacks`| dict|`{'on_left': 'toggle_calendar', 'on_middle': 'next_timezone', 'on_right': 'toggle_label'}`| Callbacks for mouse events on the clock widget.|
1313
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
1414
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
@@ -27,11 +27,10 @@ clock:
2727
calendar:
2828
blur:True
2929
round_corners:True
30-
round_corners_type:'normal'
31-
border_color:'System'
32-
alignment:'center'
33-
direction:'down'
34-
distance:6
30+
round_corners_type:"normal"
31+
border_color:"System"
32+
alignment:"center"
33+
direction:"down"
3534
callbacks:
3635
on_left:"toggle_label"
3736
on_middle:"do_nothing"
@@ -53,7 +52,8 @@ clock:
5352
- **border_color:** Set the border color for the calendar (this option is not supported on Windows 10).
5453
- **alignment:** Set the alignment of the calendar (left, right).
5554
- **direction:** Set the direction of the calendar (up, down).
56-
- **distance:** Set the distance of the calendar from the widget.
55+
- **offset_top:** Set the offset from the top of the widget container.
56+
- **offset_left:** Set the offset from the left of the widget container.
5757
- **callbacks:** A dictionary specifying the callbacks for mouse events. The keys are `on_left`, `on_middle`, and `on_right`, and the values are the names of the callback functions.
5858
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.
5959
- **container_padding**: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.

‎docs/widgets/(Widget)-Disk.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
|`volume_label`| string|`'C'`| Partition which you want to show in the bar|
77
|`decimal_display`| integer|`1`| The number of decimal to show, defaul 1 (min 0 max 3)|
88
|`update_interval`| integer|`60`| The interval in seconds to update the disk widget. Must be between 0 and 3600.|
9-
|`group_label`| dict|`{'volume_labels': ["C"], 'show_label_name': True, 'blur': True, 'round_corners': True, 'round_corners_type': 'normal','border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Group labels for multiple disks. This will show the labels of multiple disks in a popup window.|
9+
|`group_label`| dict|`{'volume_labels': ["C"], 'show_label_name': True, 'blur': True, 'round_corners': True, 'round_corners_type': 'normal','border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Group labels for multiple disks. This will show the labels of multiple disks in a popup window.|
1010
|`callbacks`| dict|`{'on_left': 'do_nothing', 'on_middle': 'do_nothing', 'on_right': "exec explorer C:\\"}`| Callbacks for mouse events.|
1111
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
1212
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
@@ -30,7 +30,6 @@ disk:
3030
border_color:"System"
3131
alignment:"right"
3232
direction:"down"
33-
distance:6
3433
callbacks:
3534
on_left:"toggle_group"
3635
on_middle:"toggle_label"
@@ -53,7 +52,8 @@ disk:
5352
- **border_color:** Border color for group label can be `None`, `System` or `Hex Color` `"#ff0000"`.
5453
- **alignment:** Alignment of the group label. Possible values are `left`, `center`, and `right`.
5554
- **direction:** Direction of the group label. Possible values are `up` and `down`.
56-
- **distance:** Distance of the group label from the widget.
55+
- **offset_top:** Offset from the top of the screen.
56+
- **offset_left:** Offset from the left of the screen.
5757
- **callbacks:** A dictionary specifying the callbacks for mouse events. The keys are `on_left`, `on_middle`, and `on_right`, and the values are the names of the callback functions.
5858
- **container_padding:** Explicitly set padding inside widget container.
5959
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.

‎docs/widgets/(Widget)-Github.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
|`max_notification`| integer|`20`| The maximum number of notifications to display in the menu.|
1111
|`only_unread`| boolean|`False`| Whether to show only unread notifications.|
1212
|`max_field_size`| integer|`100`| The maximum number of characters in the title before truncation.|
13-
|`menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Menu settings for the widget.|
13+
|`menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Menu settings for the widget.|
1414
|`icons`| dict|`{'issue': '\uf41b', 'pull_request': '\uea64', 'release': '\uea84', 'discussion': '\uf442', 'default': '\uea84', 'github_logo': '\uea84'}`| Icons for different types of notifications in the menu.|
1515
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
1616
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
@@ -34,7 +34,6 @@ github:
3434
border_color:"System"# Set the border color for the menu (this option is not supported on Windows 10)
3535
alignment:"right"
3636
direction:"down"
37-
distance:6
3837
```
3938
## Description of Options
4039
@@ -53,7 +52,8 @@ github:
5352
- **border_color:** Set the border color for the menu (this option is not supported on Windows 10).
5453
- **alignment:** Set the alignment of the menu (left, right).
5554
- **direction:** Set the direction of the menu (up, down).
56-
- **distance:** Set the distance of the menu from the widget.
55+
- **offset_top:** Set the offset from the top of the screen.
56+
- **offset_left:** Set the offset from the left of the screen.
5757
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.
5858
- **container_padding**: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.
5959

‎docs/widgets/(Widget)-Home.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
|`border_color`| string|`'System'`| Border color.|
1313
|`alignment`| string|`"left"`| Alignment of the menu. Possible values:`"left"`,`"center"`,`"right"`.|
1414
|`direction`| string|`"down"`| Direction of the menu. Possible values:`"up"`,`"down"`.|
15-
|`distance`| int|`6`| Distance from the top or bottom edge of the bar.|
15+
|`offset_top`| int|`6`| Distance from the top or bottom edge of the bar.|
16+
|`offset_left`| int|`0`| Distance from the left or right edge of the bar.|
1617
|`menu_labels`| dict|`{'shutdown': 'Shutdown', 'restart': 'Restart', 'logout': 'Logout', 'lock': 'Lock', 'sleep': 'Sleep', 'system': 'System Settings', 'about': 'About This PC', 'task_manager': 'Task Manager'}`| Custom label names for system and power items.|
1718
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
1819
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
@@ -35,7 +36,8 @@ home:
3536
round_corners:true
3637
round_corners_type:"normal"
3738
border_color:"System"
38-
distance:6
39+
offset_top:6
40+
offset_left:0
3941
container_padding:
4042
top:0
4143
left:0
@@ -67,7 +69,8 @@ home:
6769
- **border_color**: Border color. Border color for bar can be`None`, `System` or `Hex Color` `"#ff0000"`. (This applies to system round_corners and if round_corners is True.)
6870
- **alignment**: Alignment of the menu. Possible values: `"left"`, `"center"`, `"right"`.
6971
- **direction**: Direction of the menu. Possible values: `"up"`, `"down"`.
70-
- **distance**: Distance from the top or bottom edge of the bar. Use this option to set the distance from the top or bottom edge of the bar. You can set the distance in pixels.
72+
- **offset_top**: Distance from the top or bottom edge of the bar.
73+
- **offset_left**: Distance from the left or right edge of the bar.
7174
- **menu_labels**: Custom label names for system and power items. Use this option to change the default labels for system and power menu items.
7275
- **container_padding**: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.
7376
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.

‎docs/widgets/(Widget)-Server-Monitor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
|`desktop_notifications`| dict|`{'ssl': false, 'offline': false}`| Desktop notification settings. Show desktop notifications for SSL warnings and offline servers.|
1313
|`timeout`| integer|`5`| The timeout in seconds for server checks. Must be between 1 and 30.|
1414
|`servers`| list|`[]`| A list of server dictionaries.|
15-
|`menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Menu settings for the widget.|
15+
|`menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Menu settings for the widget.|
1616
|`icons`| dict|`{'online': '\uf444', 'offline': '\uf4c3', 'warning': '\uf4c3', 'reload': '\udb81\udc50'}`| Icons for different server states and actions.|
1717
|`callbacks`| dict|`{'on_left': 'toggle_label', 'on_middle': 'do_nothing', 'on_right': 'do_nothing'}`| Callbacks for mouse events on the memory widget.|
1818
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
@@ -46,7 +46,6 @@
4646
border_color:"System"
4747
alignment:"right"
4848
direction:"down"
49-
distance:6
5049
callbacks:
5150
on_left:"toggle_menu"
5251
on_right:"toggle_label"
@@ -72,7 +71,8 @@
7271
-**border_color:** Set the border color for the menu (this option is not supported on Windows 10).
7372
-**alignment:** Set the alignment of the menu (left, right).
7473
-**direction:** Set the direction of the menu (up, down).
75-
-**distance:** Set the distance of the menu from the widget.
74+
-**offset_top:** Set the offset from the top of the widget.
75+
-**offset_left:** Set the offset from the left of the widget.
7676
-**icons:** Icons for different server states and actions.
7777
-**callbacks:** Callbacks for mouse events on the memory widget.
7878
-**animation:** Animation settings for the widget.

‎docs/widgets/(Widget)-Volume.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
|`tooltip`| boolean|`True`| Whether to show the tooltip on hover.|
77
|`volume_icons`| list|`['\ueee8', '\uf026', '\uf027', '\uf027', '\uf028']`| A list of icons representing different volume levels. The icons are used based on the current volume percentage.|
88
|`callbacks`| dict|`{'on_left': 'toggle_volume_menu', 'on_middle': 'do_nothing', 'on_right': 'toggle_mute'}`| Callbacks for mouse events on the volume widget.|
9-
|`audio_menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'distance': 6}`| Menu settings for the widget.|
9+
|`audio_menu`| dict|`{'blur': True, 'round_corners': True, 'round_corners_type': 'normal', 'border_color': 'System', 'alignment': 'right', 'direction': 'down', 'offset_top': 6, 'offset_left': 0}`| Menu settings for the widget.|
1010
|`animation`| dict|`{'enabled': True, 'type': 'fadeInOut', 'duration': 200}`| Animation settings for the widget.|
1111
|`container_padding`| dict|`{'top': 0, 'left': 0, 'bottom': 0, 'right': 0}`| Explicitly set padding inside widget container.|
1212

@@ -31,7 +31,6 @@ volume:
3131
border_color:'System'
3232
alignment:'right'
3333
direction:'down'
34-
distance:6
3534
callbacks:
3635
on_left:"toggle_volume_menu"
3736
on_right:"toggle_mute"
@@ -50,7 +49,8 @@ volume:
5049
- **border_color**: Set the border color for the menu (this option is not supported on Windows 10).
5150
- **alignment**: Set the alignment of the menu (left, right).
5251
- **direction**: Set the direction of the menu (up, down).
53-
- **distance**: Set the distance of the menu from the widget.
52+
- **offset_top**: Set the top offset of the menu.
53+
- **offset_left**: Set the left offset of the menu.
5454
- **callbacks**: A dictionary specifying the callbacks for mouse events. The keys are `on_middle` and `on_right`, and the values are the names of the callback functions.
5555
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds.
5656
- **container_padding**: Explicitly set padding inside widget container. Use this option to set padding inside the widget container. You can set padding for top, left, bottom and right sides of the widget container.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp