From 4f370af4fe38afe904f9edb96fad9771da8078ab Mon Sep 17 00:00:00 2001 From: con Date: Thu, 11 Dec 2008 15:07:14 +0100 Subject: [PATCH 1/2] Fixes: - Avoid ugly toolbar by default on mac --- src/plugins/coreplugin/navigationwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/coreplugin/navigationwidget.cpp b/src/plugins/coreplugin/navigationwidget.cpp index 82ed13a29e8..8e84df39321 100644 --- a/src/plugins/coreplugin/navigationwidget.cpp +++ b/src/plugins/coreplugin/navigationwidget.cpp @@ -334,6 +334,10 @@ NavigationSubWidget::NavigationSubWidget(NavigationWidget *parentWidget) m_navigationComboBox = new NavComboBox(this); m_navigationWidget = 0; +#ifdef Q_OS_MAC + // this is to avoid ugly tool bar behavior + m_navigationComboBox->setMaximumWidth(130); +#endif m_toolbar = new QToolBar(this); m_toolbar->setContentsMargins(0, 0, 0, 0); From c4b222695e30276c6a911eb361721fd3f3ad87ac Mon Sep 17 00:00:00 2001 From: con Date: Thu, 11 Dec 2008 15:11:15 +0100 Subject: [PATCH 2/2] Fixes: - Choose... buttons are push buttons on mac --- src/libs/utils/pathchooser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp index 81a2228e669..100fdbe717f 100644 --- a/src/libs/utils/pathchooser.cpp +++ b/src/libs/utils/pathchooser.cpp @@ -46,11 +46,12 @@ #include #include #include +#include namespace Core { namespace Utils { -#ifdef Q_OS_OSX +#ifdef Q_OS_MAC /*static*/ const char * const PathChooser::browseButtonLabel = "Choose..."; #else /*static*/ const char * const PathChooser::browseButtonLabel = "Browse..."; @@ -112,7 +113,11 @@ PathChooser::PathChooser(QWidget *parent) : hLayout->addWidget(m_d->m_lineEdit); hLayout->setSizeConstraint(QLayout::SetMinimumSize); +#ifdef Q_OS_MAC + QPushButton *browseButton = new QPushButton; +#else QToolButton *browseButton = new QToolButton; +#endif browseButton->setText(tr(browseButtonLabel)); connect(browseButton, SIGNAL(clicked()), this, SLOT(slotBrowse()));