mirror of
https://github.com/YACReader/yacreader
synced 2025-07-20 22:14:41 -04:00
brough back to MacOSX the fit to width slider //ugly solution
This commit is contained in:
@ -64,6 +64,10 @@ public:
|
||||
//hacks everywhere
|
||||
//convenience method for YACReaderLibrary search edit
|
||||
YACReaderMacOSXSearchLineEdit *addSearchEdit();
|
||||
//convenience method for showing the fit to width slider in MacOSX
|
||||
QAction * addFitToWidthSlider(QAction * attachToAction);
|
||||
|
||||
|
||||
//convenience method for switching the icon of the view selector
|
||||
void updateViewSelectorIcon(const QIcon & icon);
|
||||
|
||||
|
@ -280,6 +280,20 @@ YACReaderMacOSXSearchLineEdit * YACReaderMacOSXToolbar::addSearchEdit()
|
||||
return searchEdit;
|
||||
}
|
||||
|
||||
QAction *YACReaderMacOSXToolbar::addFitToWidthSlider(QAction *attachToAction)
|
||||
{
|
||||
QMacToolBarItem *toolBarItem = addItem(attachToAction->icon(),"fit to width slider");
|
||||
|
||||
NSToolbarItem * nativeItem = toolBarItem->nativeToolBarItem();
|
||||
actions.insert(QString::fromNSString(nativeItem.itemIdentifier),attachToAction);
|
||||
|
||||
QAction * action = new QAction("",attachToAction->parent());
|
||||
|
||||
connect(toolBarItem,SIGNAL(activated()), action, SIGNAL(triggered()));
|
||||
|
||||
return action;
|
||||
}
|
||||
|
||||
void YACReaderMacOSXToolbar::updateViewSelectorIcon(const QIcon &icon)
|
||||
{
|
||||
if(viewSelector)
|
||||
|
Reference in New Issue
Block a user