11a1ef8
(#241 by @amrbashir) On Windows, fix changing state of menu items inside amuda::Menu
not immedietly reflected on the window menu bar.
3b58a2e
(#237 by @amrbashir) FixPredefinedMenuItem::about
sending events where it shouldn't.
8bf315e
(#229 by @amrbashir) On Linux, fixIconMenuItem
overlapping neighbouring items when added to aMenu
.
-
40d06c5
(#226 by @amrbashir) Breaking change Renamed theacccelerator
method (which has an extrac
) onMenuItemBuilder
,CheckMenuItemBuilder
, andIconMenuItemBuilder
toaccelerator
. -
0d368bb
(#220 by @madsmtm) Breaking Change Changed the type of the pointer passed inshow_context_menu_for_nsview
toc_void
, and make the methodunsafe
. -
63c9f28
(#224 by @Legend-Master) Fixset_theme_for_hwnd
always resulting in dark on Windows, and doesn't refresh until losing and regaining focus -
f781c0e
(#227 by @amrbashir) Breaking change Marked a few methods withunsafe
to better represent the safety guarantees:ContextMenu::show_context_menu_for_hwnd
ContextMenu::attach_menu_subclass_for_hwnd
ContextMenu::detach_menu_subclass_from_hwnd
Menu::init_for_hwnd
Menu::init_for_hwnd_with_theme
Menu::set_theme_for_hwnd
Menu::remove_for_hwnd
Menu::hide_for_hwnd
Menu::show_for_hwnd
Menu::is_visible_on_hwnd
-
5c8971a
(#221 by @madsmtm) Useobjc2
internally, leading to much better memory safety. The crate will panic now if used from a thread that is not the main thread.
07ca638
(#213) Fix handling the separator ofCARGO_PKG_AUTHORS
environment variable value infrom_cargo_metadata
macro.bb40d8c
On Windows, fix crash when showing a context menu but dropping the Menu before the context menu is closed.
11d8b7a
(#208 by @amrbashir) Addedabout_metadata
module andabout_metadata::from_cargo_metadata
macro.11d8b7a
(#208 by @amrbashir) Breaking Change RemovedAboutMetadata::from_cargo_metadata
andAboutMetadataBuilder::with_cargo_metadata
which had incorrect implementation, use the newabout_metadata::from_cargo_metadata
macro instead.32bff56
(#210 by @amrbashir) Updatewindow-sys
crate to0.59
20ea54b
(#200) On macOS, close tray menu before removing it to prevent user click on a released menu item resulting in a crash.
e758002
(#194) On Windows, fix menubar drawing when using a fixed dark theme while Windows itself in Light theme.
e758002
(#194) On Windows, addMenu::init_for_hwnd_with_theme
andMenu::set_theme_for_hwnd
to control the window menu bar theme.
-
90926d4
(#174) Moved the following items intodpi
module which is just an export ofdpi
crate:Pixel
validate_scale_factor
LogicalPosition
PhysicalPosition
Position
8960f0d
(#171) On Windows, fix using multiple context menus resulted in receiving events only for the last used one.
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.
-
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 fromString
to the newly addedAcceleratorParseError
enum.
- Added
-
2d7828f
(#157) Avoid panicing when parsing an invalidAccelerator
from a string such asSHIFT+SHIFT
and return an error instead.
f64a62f
(#153) On Linux, fix a regression where menubar is not added as the first child when using agtk::Box
as the container.
-
ae316bf
(#139) ChangedContextMenu::show_context_menu_for_gtk_window
to takegtk::Window
instead ofgtk::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
3672a0c
(#130) AddPredefinedMenuItem::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.
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.
45345ad
On macOS, fixed autorelease from separator twice.
c1fbde7
(#116) AddedAboutMetadata::from_cargo_metadata
andAboutMetadataBuilder::with_cargo_metadata
to build the application metadata from Cargo package metadata.
02e537e
(#112) Addedinto_id
method toMenuItem
,CheckMenuItem
,PredefinedMenuItem
,Submenu
,MenuItemKind
andIsMenuItem
trait. It moves the menu item into its id.622f30b
Updatekeyboard-types
to0.7
bce7540
(#113) AddMenuItemKind::id
convenient method to get access to the inner kind id.
8d832c0
Wrapped theid
field of theMenu
struct in anRc
to be consistent with other menu structs and make it cheaper to clone.
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.
e046132
ChangedIconMenuItem::set_native_icon
to take&self
instead of&mut self
.
47d1808
Deriveserde
for more types.
33168fa
(#98) On Windows, draw a dark menu bar if the Window supports and has dark-mode enabled.1a527e8
(#100) AddPartialEq<&str> for &MenuId
andPartialEq<String> for &MenuId
implementations. Also add a blanketFrom<T> for MenuId
whereT: ToString
implementation.
829051a
Dereference&String
and&&str
inPartialEq
forMenuId
type
32be0c5
(#94) On Windows, reduce some unneccassry string cloning.32be0c5
(#94) AddMenuId::new
convenience method.
662e17d
(#92) AddDrop
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 extendgtk::Box
. This ensures that the menu bar is added at the beginning of the box instead of at the bottom.bb92b56
On macOS, changedSubmenu::set_windows_menu_for_nsapp
andSubmenu::set_help_menu_for_nsapp
toSubmenu::set_as_windows_menu_for_nsapp
andSubmenu::set_as_help_menu_for_nsapp
874f345
AddMenuId
struct an changed all.id()
methods to returnMenuId
instead of a u32.043026c
(#93) AddMenu/Submenu::remove_at
to remove an item at specified index.662e17d
(#92) On Windows, fix.set_text()
sometimes adding gebberish characters after multiple calls.
7a3bc55
(#81) On Windows, fixContextMenu::detach_menu_subclass_from_hwnd
crashing and terminating the thread.
ee30bf8
(#73) Added thebuilders
which contains convenient builder types, likeAboutMetadataBuilder
,MenuItemBuilder
,SubmenuBuilder
...etc.c7ec320
(#78) Breaking Change:ContextMenu::show_context_menu_for_hwnd
,ContextMenu::show_context_menu_for_gtk_window
andContextMenu::show_context_menu_for_nsview
has been changed to take an optionalInto<Position>
type instead ofx
andy
. ifNone
is provided, it will use the current cursor position.98701d0
(#75) Breaking Change: ChangedMenu::init_for_gtk_window
to accept a second argument for a container to which the menu bar should be added, ifNone
was provided, it will add it to the window directly. The method will no longer create agtk::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: RemovedMenuItemType
enum and replaced withMenuItemKind
enum.Menu::items
andSubmenu::items
methods will now returnVec<MenuItemKind>
instead ofVec<Box<dyn MenuItemExt>>
0000e56
(#71) Breaking Change: ChangedMenuItemExt
trait name toIsMenuItem
ee30bf8
(#73) ImplTryFrom<&str>
andTryFrom<String>
forAccelerator
.
ac14222
(#69) Addcommon-controls-v6
feature flag, disabled by default, which could be used to enable usage ofTaskDialogIndirect
API fromComCtl32.dll
v6 on Windows for The predefinedAbout
menu item.7af4477
(#67) Addlibxdo
feature flag, enabled by default, to control whether to linklibxdo
on Linux or not.fabbbac
(#66) Add support forAboutMetadata
on macOS
- Add
(MenuItem|CheckMenuItem|IconMenuItem)::set_accelerator
to change or disable the accelerator after creation.
- On Windows, fix panic when click a menu item while the
PredefinedMenuItem::about
dialog is open. - On Windows, Fix a panic when adding
CheckMenuItem
to aMenu
.
- On Windows, fix
MenuEvent
not triggered forIconMenuItem
. - On Windows, The
Close
predefined menu item will sendWM_CLOSE
to the window instead of callingDestroyWindow
to let the developer catch this event and decide whether to close the window or not.
- Implement
PredefinedMenuItemm::maximize
andPredefinedMenuItemm::hide
on Windows. - Add docs for predefined menu items
- Fix panic when updating a
CheckMenuItem
right after it was clicked.
- Update docs
- 4b2ebc2 docs: update docs on 2023-02-08
- Bump gtk version: 0.15 -> 0.16
- Add
MenuEvent::set_event_handler
to set a handler for new menu events. - Breaking change Remove
menu_event_receiver
function, useMenuEvent::receiver
instead.
- Derive
Copy
forAccelerator
type.- e80c113 feat: derive
Copy
forAccelerator
on 2022-12-12
- e80c113 feat: derive
- Fix parsing one letter string as valid accelerator without modifiers.
- Initial Release.
- 0309d10 chore: prepare for first release on 2022-12-05