27 KiB
Changelog
[0.17.1]
[0.17.0]
-
8e986af(#289 by @amrbashir) Add helper methods onContextMenutrait to convert it back to a concrete type:ContextMenu::as_menuContextMenu::as_menu_uncheckedContextMenu::as_submenuContextMenu::as_submenu_unchecked
-
8efa5a2(#300 by @dgerhardt) On Linux, fix&&resulting in&&when it should be just&. Also fix_not visible and actually adding a mnemonic. This makes the behavior on Linux match the behavior on Windows. -
e19a6eb(#283 by @ogoffart) Make gtk an optional feature (enabled by default) -
e37d99b(#277 by @s00d) Add support for icons onSubmenuso we added:Submenu::set_iconSubmenu::set_native_iconSubmenuBuilder::iconSubmenuBuilder::native_icon
[0.16.1]
6b3e2e5(#278 by @Legend-Master) Fix the buffer overflow when callingtexton Windows
[0.16.0]
cf9dcfa(#236) ReturnboolinContextMenu::show_context_menu_for_hwnd,ContextMenu::show_context_menu_for_nsviewandContextMenu::show_context_menu_for_gtk_windowto indicate why the context menu was closed.99ec648(#244) AddAccelerator::modifiersandAccelerator::keygetter methods.372f8a1(#269) Updated objc2 to 0.6e6b68f9Change internalmut staticto usethread_local!andCellinstead.
[0.15.3]
11a1ef8(#241 by @amrbashir) On Windows, fix changing state of menu items inside amuda::Menunot immedietly reflected on the window menu bar.
[0.15.2]
3b58a2e(#237 by @amrbashir) FixPredefinedMenuItem::aboutsending events where it shouldn't.
[0.15.1]
8bf315e(#229 by @amrbashir) On Linux, fixIconMenuItemoverlapping neighbouring items when added to aMenu.
[0.15.0]
-
40d06c5(#226 by @amrbashir) Breaking change Renamed theaccceleratormethod (which has an extrac) onMenuItemBuilder,CheckMenuItemBuilder, andIconMenuItemBuildertoaccelerator. -
0d368bb(#220 by @madsmtm) Breaking Change Changed the type of the pointer passed inshow_context_menu_for_nsviewtoc_void, and make the methodunsafe. -
63c9f28(#224 by @Legend-Master) Fixset_theme_for_hwndalways resulting in dark on Windows, and doesn't refresh until losing and regaining focus -
f781c0e(#227 by @amrbashir) Breaking change Marked a few methods withunsafeto better represent the safety guarantees:ContextMenu::show_context_menu_for_hwndContextMenu::attach_menu_subclass_for_hwndContextMenu::detach_menu_subclass_from_hwndMenu::init_for_hwndMenu::init_for_hwnd_with_themeMenu::set_theme_for_hwndMenu::remove_for_hwndMenu::hide_for_hwndMenu::show_for_hwndMenu::is_visible_on_hwnd
-
5c8971a(#221 by @madsmtm) Useobjc2internally, leading to much better memory safety. The crate will panic now if used from a thread that is not the main thread.
[0.14.1]
07ca638(#213) Fix handling the separator ofCARGO_PKG_AUTHORSenvironment variable value infrom_cargo_metadatamacro.bb40d8cOn Windows, fix crash when showing a context menu but dropping the Menu before the context menu is closed.
[0.14.0]
11d8b7a(#208 by @amrbashir) Addedabout_metadatamodule andabout_metadata::from_cargo_metadatamacro.11d8b7a(#208 by @amrbashir) Breaking Change RemovedAboutMetadata::from_cargo_metadataandAboutMetadataBuilder::with_cargo_metadatawhich had incorrect implementation, use the newabout_metadata::from_cargo_metadatamacro instead.32bff56(#210 by @amrbashir) Updatewindow-syscrate to0.59
[0.13.5]
20ea54b(#200) On macOS, close tray menu before removing it to prevent user click on a released menu item resulting in a crash.
[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, addMenu::init_for_hwnd_with_themeandMenu::set_theme_for_hwndto control the window menu bar theme.
[0.13.2]
[0.13.1]
[0.13.0]
-
90926d4(#174) Moved the following items intodpimodule which is just an export ofdpicrate:Pixelvalidate_scale_factorLogicalPositionPhysicalPositionPosition
[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
AcceleratorParseErrorerror enum. - Removed
Error::UnrecognizedAcceleratorCodeenum variant - Removed
Error::EmptyAcceleratorTokenenum variant - Removed
Error::UnexpectedAcceleratorFormatenum variant - Changed
Error::AcceleratorParseErrorinner value fromStringto the newly addedAcceleratorParseErrorenum.
- Added
-
2d7828f(#157) Avoid panicing when parsing an invalidAcceleratorfrom a string such asSHIFT+SHIFTand 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 agtk::Boxas the container.
[0.11.4]
[0.11.3]
[0.11.2]
[0.11.1]
[0.11.0]
-
ae316bf(#139) ChangedContextMenu::show_context_menu_for_gtk_windowto takegtk::Windowinstead ofgtk::ApplicationWindowand relaxed generic gtk constraints on the following methods:MenuBar::init_for_gtk_windowMenuBar::remove_for_gtk_windowMenuBar::hide_for_gtk_windowMenuBar::show_for_gtk_windowMenuBar::is_visible_on_gtk_windowMenuBar::gtk_menubar_for_gtk_window
[0.10.0]
[0.9.4]
3672a0c(#130) AddPredefinedMenuItem::bring_all_to_frontfor '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]
45345adOn macOS, fixed autorelease from separator twice.
[0.9.1]
c1fbde7(#116) AddedAboutMetadata::from_cargo_metadataandAboutMetadataBuilder::with_cargo_metadatato build the application metadata from Cargo package metadata.
[0.9.0]
02e537e(#112) Addedinto_idmethod toMenuItem,CheckMenuItem,PredefinedMenuItem,Submenu,MenuItemKindandIsMenuItemtrait. It moves the menu item into its id.622f30bUpdatekeyboard-typesto0.7bce7540(#113) AddMenuItemKind::idconvenient method to get access to the inner kind id.
[0.8.7]
8d832c0Wrapped theidfield of theMenustruct in anRcto 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]
e046132ChangedIconMenuItem::set_native_iconto take&selfinstead of&mut self.
[0.8.4]
47d1808Deriveserdefor 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) AddPartialEq<&str> for &MenuIdandPartialEq<String> for &MenuIdimplementations. Also add a blanketFrom<T> for MenuIdwhereT: ToStringimplementation.
[0.8.2]
829051aDereference&Stringand&&strinPartialEqforMenuIdtype
[0.8.1]
32be0c5(#94) On Windows, reduce some unneccassry string cloning.32be0c5(#94) AddMenuId::newconvenience method.
[0.8.0]
662e17d(#92) AddDropimplementation for the inner types to release memory and OS resources.7ca4b11(#89) Breaking Change: On Linux,Menu::inti_for_gtk_windowhas been changed to require the second paramter to extendgtk::Box. This ensures that the menu bar is added at the beginning of the box instead of at the bottom.bb92b56On macOS, changedSubmenu::set_windows_menu_for_nsappandSubmenu::set_help_menu_for_nsapptoSubmenu::set_as_windows_menu_for_nsappandSubmenu::set_as_help_menu_for_nsapp874f345AddMenuIdstruct an changed all.id()methods to returnMenuIdinstead of a u32.043026c(#93) AddMenu/Submenu::remove_atto 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]
[0.7.1]
7a3bc55(#81) On Windows, fixContextMenu::detach_menu_subclass_from_hwndcrashing and terminating the thread.
[0.7.0]
ee30bf8(#73) Added thebuilderswhich contains convenient builder types, likeAboutMetadataBuilder,MenuItemBuilder,SubmenuBuilder...etc.c7ec320(#78) Breaking Change:ContextMenu::show_context_menu_for_hwnd,ContextMenu::show_context_menu_for_gtk_windowandContextMenu::show_context_menu_for_nsviewhas been changed to take an optionalInto<Position>type instead ofxandy. ifNoneis provided, it will use the current cursor position.98701d0(#75) Breaking Change: ChangedMenu::init_for_gtk_windowto accept a second argument for a container to which the menu bar should be added, ifNonewas provided, it will add it to the window directly. The method will no longer create agtk::Boxand 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: RemovedMenuItemTypeenum and replaced withMenuItemKindenum.Menu::itemsandSubmenu::itemsmethods will now returnVec<MenuItemKind>instead ofVec<Box<dyn MenuItemExt>>0000e56(#71) Breaking Change: ChangedMenuItemExttrait name toIsMenuItemee30bf8(#73) ImplTryFrom<&str>andTryFrom<String>forAccelerator.
[0.6.0]
ac14222(#69) Addcommon-controls-v6feature flag, disabled by default, which could be used to enable usage ofTaskDialogIndirectAPI fromComCtl32.dllv6 on Windows for The predefinedAboutmenu item.7af4477(#67) Addlibxdofeature flag, enabled by default, to control whether to linklibxdoon Linux or not.fabbbac(#66) Add support forAboutMetadataon macOS
[0.5.0]
- Add
(MenuItem|CheckMenuItem|IconMenuItem)::set_acceleratorto change or disable the accelerator after creation.
[0.4.5]
- On Windows, fix panic when click a menu item while the
PredefinedMenuItem::aboutdialog is open. - On Windows, Fix a panic when adding
CheckMenuItemto aMenu.
[0.4.4]
- On Windows, fix
MenuEventnot triggered forIconMenuItem. - On Windows, The
Closepredefined menu item will sendWM_CLOSEto the window instead of callingDestroyWindowto let the developer catch this event and decide whether to close the window or not.
[0.4.3]
- Implement
PredefinedMenuItemm::maximizeandPredefinedMenuItemm::hideon Windows. - Add docs for predefined menu items
[0.4.2]
- Fix panic when updating a
CheckMenuItemright after it was clicked.
[0.4.1]
- Update docs
- 4b2ebc2 docs: update docs on 2023-02-08
[0.4.0]
- Bump gtk version: 0.15 -> 0.16
[0.3.0]
- Add
MenuEvent::set_event_handlerto set a handler for new menu events. - Breaking change Remove
menu_event_receiverfunction, useMenuEvent::receiverinstead.
[0.2.0]
[0.1.1]
- Derive
CopyforAcceleratortype.- e80c113 feat: derive
CopyforAcceleratoron 2022-12-12
- e80c113 feat: derive
- Fix parsing one letter string as valid accelerator without modifiers.
[0.1.0]
- Initial Release.
- 0309d10 chore: prepare for first release on 2022-12-05