mirror of
https://github.com/YACReader/yacreader
synced 2025-07-23 07:24:58 -04:00
first version of native NSToolbar working, it still needs some work for adding the adjust to width slider in YACReder and the search edit in YACReaderLibrary
This commit is contained in:
@ -91,7 +91,10 @@
|
||||
- (IBAction)itemClicked:(id)sender
|
||||
{
|
||||
NSToolbarItem *item = reinterpret_cast<NSToolbarItem *>(sender);
|
||||
//toolbarPrivate->itemClicked(item);
|
||||
|
||||
QString identifier = QString::fromNSString([item itemIdentifier]);
|
||||
QMacToolBarItem *toolButton = reinterpret_cast<QMacToolBarItem *>(identifier.toULongLong());
|
||||
Q_EMIT toolButton->activated();
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar: (NSToolbar *)toolbar itemForItemIdentifier: (NSString *) itemIdentifier willBeInsertedIntoToolbar:(BOOL) willBeInserted
|
||||
@ -100,8 +103,6 @@
|
||||
Q_UNUSED(willBeInserted);
|
||||
QList<QMacToolBarItem *> items = mytoolbar->items();
|
||||
|
||||
int i = [itemIdentifier intValue];
|
||||
|
||||
foreach (const QMacToolBarItem * item, items) {
|
||||
NSToolbarItem *toolbarItem = item->nativeToolBarItem();
|
||||
if([toolbarItem.itemIdentifier isEqual:itemIdentifier])
|
||||
|
Reference in New Issue
Block a user