commit edcd374d95e94be8ab8fb120596ea80b48f27880 Author: Tomas Touceda chiiph@torproject.org Date: Tue May 31 21:00:59 2011 -0300
Improve detach tab on Mac --- src/vidalia/MainWindow.cpp | 4 ++++ src/vidalia/VAttachButton.cpp | 2 +- src/vidalia/VTabWidget.cpp | 1 + 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp index 4c4359e..96d6482 100644 --- a/src/vidalia/MainWindow.cpp +++ b/src/vidalia/MainWindow.cpp @@ -1603,7 +1603,11 @@ MainWindow::addTab(VidaliaTab *tab) ui.tabWidget->setCurrentIndex(pos);
atb->setTab(tab); +#if defined(Q_WS_MAC) + ui.tabWidget->setTabButton(pos, QTabBar::RightSide, atb); +#else ui.tabWidget->setTabButton(pos, QTabBar::LeftSide, atb); +#endif
connect(tab, SIGNAL(closeTab()), this, SLOT(handleAttachedClose())); diff --git a/src/vidalia/VAttachButton.cpp b/src/vidalia/VAttachButton.cpp index b5a5bab..e8496f2 100644 --- a/src/vidalia/VAttachButton.cpp +++ b/src/vidalia/VAttachButton.cpp @@ -24,7 +24,7 @@ VAttachButton::VAttachButton(QWidget *parent) : _attached = true; setIcon(QIcon(IMG_DETACH)); setFlat(true); - resize(16,16); + resize(24,24); }
VAttachButton::~VAttachButton() diff --git a/src/vidalia/VTabWidget.cpp b/src/vidalia/VTabWidget.cpp index a1bef76..1510549 100644 --- a/src/vidalia/VTabWidget.cpp +++ b/src/vidalia/VTabWidget.cpp @@ -15,6 +15,7 @@ void VTabWidget::pinTab(int position) { tabBar()->setTabButton(position, QTabBar::RightSide, 0); + tabBar()->setTabButton(position, QTabBar::LeftSide, 0); }
void