Skip to content

Commit

Permalink
refactor(api): change button_state to camelCase (#11114)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Sep 24, 2024
1 parent e08c4e6 commit 948772a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/button-state-camel-case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@tauri-apps/api": patch:breaking
"tauri": patch:bug
---

Change the `button_state` tray event field to camelCase `buttonState`.
1 change: 1 addition & 0 deletions crates/tauri/src/tray/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ impl From<tray_icon::MouseButton> for MouseButton {
#[non_exhaustive]
pub enum TrayIconEvent {
/// A click happened on the tray icon.
#[serde(rename_all = "camelCase")]
Click {
/// Id of the tray icon which triggered this event.
id: TrayIconId,
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface TrayIconClickEvent {
/** Mouse button that triggered this event. */
button: MouseButton
/** Mouse button state when this event was triggered. */
button_state: MouseButtonState
buttonState: MouseButtonState
}

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

0 comments on commit 948772a

Please sign in to comment.