Skip to content

Latest commit

 

History

History
237 lines (146 loc) · 18.7 KB

CHANGELOG.md

File metadata and controls

237 lines (146 loc) · 18.7 KB

Changelog

[0.13.4]

  • e758002(#194) On Windows, fix menubar drawing when using a fixed dark theme while Windows itself in Light theme.

[0.13.3]

  • e758002(#194) On Windows, add Menu::init_for_hwnd_with_theme and Menu::set_theme_for_hwnd to control the window menu bar theme.

[0.13.2]

  • 1dc9d3f(#190) On Linux, fix context menu closing immediately when right click is released.

[0.13.1]

  • 2edfbf1(#176) On macOS, fix a crash when removing a menu item.

[0.13.0]

  • 90926d4(#174) Moved the following items into dpi module which is just an export of dpi crate:

    • Pixel
    • validate_scale_factor
    • LogicalPosition
    • PhysicalPosition
    • Position

[0.12.2]

  • 8960f0d(#171) On Windows, fix using multiple context menus resulted in receiving events only for the last used one.

[0.12.1]

  • cbb9fc0(#166) On Windows, fix events not emitted for other menus after using a menu as a context menu.
  • a9937ef(#164) On Windows, fix menubar removed from window when another menu that was used as a conetxt menu is dropped.

[0.12.0]

  • 2d7828f(#157) Refactored the errors when parsing accelerator from string:

    • Added AcceleratorParseError error enum.
    • Removed Error::UnrecognizedAcceleratorCode enum variant
    • Removed Error::EmptyAcceleratorToken enum variant
    • Removed Error::UnexpectedAcceleratorFormat enum variant
    • Changed Error::AcceleratorParseError inner value from String to the newly added AcceleratorParseError enum.
  • 2d7828f(#157) Avoid panicing when parsing an invalid Accelerator from a string such as SHIFT+SHIFT and return an error instead.

[0.11.5]

  • f64a62f(#153) On Linux, fix a regression where menubar is not added as the first child when using a gtk::Box as the container.

[0.11.4]

  • a7e61fb(#149) On macOS, fix a crash when appending separators.

[0.11.3]

  • 20c45a4(#147) On macOS, fixed a panic when releasing separator menu item.

[0.11.2]

  • afd3e2e(#143) Fixes menu item's enabled state not applied for submenus on macOS.

[0.11.1]

[0.11.0]

  • ae316bf(#139) Changed ContextMenu::show_context_menu_for_gtk_window to take gtk::Window instead of gtk::ApplicationWindow and relaxed generic gtk constraints on the following methods:

    • MenuBar::init_for_gtk_window
    • MenuBar::remove_for_gtk_window
    • MenuBar::hide_for_gtk_window
    • MenuBar::show_for_gtk_window
    • MenuBar::is_visible_on_gtk_window
    • MenuBar::gtk_menubar_for_gtk_window

[0.10.0]

  • 8d95612(#133) Upgrade gtk to 0.18 and bump MSRV to 1.70.0.

[0.9.4]

  • 3672a0c(#130) Add PredefinedMenuItem::bring_all_to_front for 'Bring All to Front' menu item on macOS.
  • e34040e(#126) On Windows, draw over the white line under the menubar in dark mode.

[0.9.3]

  • bdd0c9a(#122) On macOS, fix menu crash due to a double freeing the underlying NsMenu.
  • f7e3030(#125) On Windwos, redraw the menubar when adding a new menu item or a submenu.

[0.9.2]

  • 45345ad On macOS, fixed autorelease from separator twice.

[0.9.1]

  • c1fbde7(#116) Added AboutMetadata::from_cargo_metadata and AboutMetadataBuilder::with_cargo_metadata to build the application metadata from Cargo package metadata.

[0.9.0]

  • 02e537e(#112) Added into_id method to MenuItem, CheckMenuItem, PredefinedMenuItem, Submenu, MenuItemKind and IsMenuItem trait. It moves the menu item into its id.
  • 622f30b Update keyboard-types to 0.7
  • bce7540(#113) Add MenuItemKind::id convenient method to get access to the inner kind id.

[0.8.7]

  • 8d832c0 Wrapped the id field of the Menu struct in an Rc to be consistent with other menu structs and make it cheaper to clone.

[0.8.6]

  • 4701bb8(#105) On Windows, fix menu items inside a context menu not firing events if the context menu was used on a Window that doesn't have a menu bar.

[0.8.5]

  • e046132 Changed IconMenuItem::set_native_icon to take &self instead of &mut self.

[0.8.4]

  • 47d1808 Derive serde for more types.

[0.8.3]

  • 33168fa(#98) On Windows, draw a dark menu bar if the Window supports and has dark-mode enabled.
  • 1a527e8(#100) Add PartialEq<&str> for &MenuId and PartialEq<String> for &MenuId implementations. Also add a blanket From<T> for MenuId where T: ToString implementation.

[0.8.2]

  • 829051a Dereference &String and &&str in PartialEq for MenuId type

[0.8.1]

  • 32be0c5(#94) On Windows, reduce some unneccassry string cloning.
  • 32be0c5(#94) Add MenuId::new convenience method.

[0.8.0]

  • 662e17d(#92) Add Drop implementation for the inner types to release memory and OS resources.
  • 7ca4b11(#89) Breaking Change: On Linux, Menu::inti_for_gtk_window has been changed to require the second paramter to extend gtk::Box. This ensures that the menu bar is added at the beginning of the box instead of at the bottom.
  • bb92b56 On macOS, changed Submenu::set_windows_menu_for_nsapp and Submenu::set_help_menu_for_nsapp to Submenu::set_as_windows_menu_for_nsapp and Submenu::set_as_help_menu_for_nsapp
  • 874f345 Add MenuId struct an changed all .id() methods to return MenuId instead of a u32.
  • 043026c(#93) Add Menu/Submenu::remove_at to remove an item at specified index.
  • 662e17d(#92) On Windows, fix .set_text() sometimes adding gebberish characters after multiple calls.

[0.7.3]

[0.7.2]

  • 0bad3ac(#84) Manually retain/release NSMenu reference.

[0.7.1]

  • 7a3bc55(#81) On Windows, fix ContextMenu::detach_menu_subclass_from_hwnd crashing and terminating the thread.

[0.7.0]

  • ee30bf8(#73) Added the builders which contains convenient builder types, like AboutMetadataBuilder, MenuItemBuilder, SubmenuBuilder ...etc.
  • c7ec320(#78) Breaking Change: ContextMenu::show_context_menu_for_hwnd, ContextMenu::show_context_menu_for_gtk_window and ContextMenu::show_context_menu_for_nsview has been changed to take an optional Into<Position> type instead of x and y. if None is provided, it will use the current cursor position.
  • 98701d0(#75) Breaking Change: Changed Menu::init_for_gtk_window to accept a second argument for a container to which the menu bar should be added, if None was provided, it will add it to the window directly. The method will no longer create a gtk::Box and append it to the window, instead you should add the box to the window yourself, then pass a reference to it to the method so it can be used as the container for the menu bar.
  • 20c05ce(#79) Breaking Change: Removed MenuItemType enum and replaced with MenuItemKind enum. Menu::items and Submenu::items methods will now return Vec<MenuItemKind> instead of Vec<Box<dyn MenuItemExt>>
  • 0000e56(#71) Breaking Change: Changed MenuItemExt trait name to IsMenuItem
  • ee30bf8(#73) Impl TryFrom<&str> and TryFrom<String> for Accelerator.

[0.6.0]

  • ac14222(#69) Add common-controls-v6 feature flag, disabled by default, which could be used to enable usage of TaskDialogIndirect API from ComCtl32.dll v6 on Windows for The predefined About menu item.
  • 7af4477(#67) Add libxdo feature flag, enabled by default, to control whether to link libxdo on Linux or not.
  • fabbbac(#66) Add support for AboutMetadata on macOS

[0.5.0]

  • Add (MenuItem|CheckMenuItem|IconMenuItem)::set_accelerator to change or disable the accelerator after creation.
    • 47ba0b4 feat: add set_accelerator (#64) on 2023-05-04

[0.4.5]

  • On Windows, fix panic when click a menu item while the PredefinedMenuItem::about dialog is open.
    • f3883ee fix(windows): run the about dialog in its own thread, closes #57 (#60) on 2023-03-27
  • On Windows, Fix a panic when adding CheckMenuItem to a Menu.
    • 059fceb fix(windows): downcast check menu item correctly (#58) on 2023-03-27

[0.4.4]

  • On Windows, fix MenuEvent not triggered for IconMenuItem.
    • 88d3520 fix(Windows): dispatch menu event for icon menu item (#53) on 2023-03-06
  • On Windows, The Close predefined menu item will send WM_CLOSE to the window instead of calling DestroyWindow to let the developer catch this event and decide whether to close the window or not.
    • f322ad4 fix(Windows): send WM_CLOSE instead of DestroyWindow (#55) on 2023-03-06

[0.4.3]

  • Implement PredefinedMenuItemm::maximize and PredefinedMenuItemm::hide on Windows.
    • d2bd85b docs: add docs for PredefinedMenuItem (#51) on 2023-02-28
  • Add docs for predefined menu items
    • d2bd85b docs: add docs for PredefinedMenuItem (#51) on 2023-02-28

[0.4.2]

  • Fix panic when updating a CheckMenuItem right after it was clicked.
    • 923af09 fix(linux): fix multiple borrow panic (#48) on 2023-02-14

[0.4.1]

  • Update docs
    • 4b2ebc2 docs: update docs on 2023-02-08

[0.4.0]

  • Bump gtk version: 0.15 -> 0.16
    • fb3d0aa chore(deps): bump gtk version 0.15 -> 0.16 (#38) on 2023-01-26

[0.3.0]

  • Add MenuEvent::set_event_handler to set a handler for new menu events.
    • f871c68 refactor: allow changing the menu event sender (#35) on 2023-01-03
  • Breaking change Remove menu_event_receiver function, use MenuEvent::receiver instead.
    • f871c68 refactor: allow changing the menu event sender (#35) on 2023-01-03

[0.2.0]

  • Add IconMenuItem

[0.1.1]

  • Derive Copy for Accelerator type.
    • e80c113 feat: derive Copy for Accelerator on 2022-12-12
  • Fix parsing one letter string as valid accelerator without modifiers.
    • 0173987 fix: parse one letter string to valid accelerator (#28) on 2022-12-20

[0.1.0]

  • Initial Release.
    • 0309d10 chore: prepare for first release on 2022-12-05