Skip to content

Commit 948772a

Browse files
authored
refactor(api): change button_state to camelCase (#11114)
1 parent e08c4e6 commit 948772a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@tauri-apps/api": patch:breaking
3+
"tauri": patch:bug
4+
---
5+
6+
Change the `button_state` tray event field to camelCase `buttonState`.

crates/tauri/src/tray/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ impl From<tray_icon::MouseButton> for MouseButton {
7979
#[non_exhaustive]
8080
pub enum TrayIconEvent {
8181
/// A click happened on the tray icon.
82+
#[serde(rename_all = "camelCase")]
8283
Click {
8384
/// Id of the tray icon which triggered this event.
8485
id: TrayIconId,

packages/api/src/tray.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export interface TrayIconClickEvent {
2626
/** Mouse button that triggered this event. */
2727
button: MouseButton
2828
/** Mouse button state when this event was triggered. */
29-
button_state: MouseButtonState
29+
buttonState: MouseButtonState
3030
}
3131

3232
/** A double click happened on the tray icon. **Windows Only** */

0 commit comments

Comments
 (0)