Hi, the attached patch is not intended as true patch but as a proposal for some enhancements in the user interface.
1) cppcodecompletion.cpp The new FunctionArgumentWidget is a great enhancement though I was struggling every day when I wanted to switch through the different function types. The arrows show left and right, but I have to press up and down. My patch simply converts the leftArrow to a downArrow and the rightArrow to an upArrow. This way it is more intuitive to use. 2) The quickopentoolwindow should be larger. My patch simply enlarges it to 800 pixels. Maybe we should think about a sophisticated calculation here, too. 3) Yes, I know the current Implementation of the code folding mechanism is a draft and i preferred the old +/- style folding mechanism but my patch takes away the hugh contrast used by the default color of the arrows (which is black in my case). I use to hang out on #qt-creator (choenig) if you're looking for me. I'd be happy to get some feedback or ideas for further improvements :-). thanks and take care, have fun /christian
From 826713fc3a23d4e7e2427e828a42ea8292eb5e07 Mon Sep 17 00:00:00 2001 From: Christian Hoenig <[email protected]> Date: Sun, 26 Apr 2009 01:22:50 +0200 Subject: [PATCH] minor GUI enhancements o use up/down arrows as this is how it is navigated by keyboard o decrease contrast of folding markers to avoid disctraction o increase size of QuickOpen popup --- src/plugins/cpptools/cppcodecompletion.cpp | 24 ++++++++++++------------ src/plugins/quickopen/quickopentoolwindow.cpp | 4 ++-- src/plugins/texteditor/basetexteditor.cpp | 4 ++-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index b9d880a..94da4af 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -208,15 +208,15 @@ FunctionArgumentWidget::FunctionArgumentWidget(): m_popupFrame->setFocusPolicy(Qt::NoFocus); m_popupFrame->setAttribute(Qt::WA_DeleteOnClose); - QToolButton *leftArrow = new QToolButton; - leftArrow->setArrowType(Qt::LeftArrow); - leftArrow->setFixedSize(16, 16); - leftArrow->setAutoRaise(true); + QToolButton *downArrow = new QToolButton; + downArrow->setArrowType(Qt::DownArrow); + downArrow->setFixedSize(16, 16); + downArrow->setAutoRaise(true); - QToolButton *rightArrow = new QToolButton; - rightArrow->setArrowType(Qt::RightArrow); - rightArrow->setFixedSize(16, 16); - rightArrow->setAutoRaise(true); + QToolButton *upArrow = new QToolButton; + upArrow->setArrowType(Qt::UpArrow); + upArrow->setFixedSize(16, 16); + upArrow->setAutoRaise(true); m_popupFrame->setFrameStyle(QFrame::Box); m_popupFrame->setFrameShadow(QFrame::Plain); @@ -228,10 +228,10 @@ FunctionArgumentWidget::FunctionArgumentWidget(): QHBoxLayout *hbox = new QHBoxLayout(m_pager); hbox->setMargin(0); hbox->setSpacing(0); - hbox->addWidget(leftArrow); + hbox->addWidget(downArrow); m_numberLabel = new QLabel; hbox->addWidget(m_numberLabel); - hbox->addWidget(rightArrow); + hbox->addWidget(upArrow); QHBoxLayout *layout = new QHBoxLayout; layout->setMargin(0); @@ -240,8 +240,8 @@ FunctionArgumentWidget::FunctionArgumentWidget(): layout->addWidget(this); m_popupFrame->setLayout(layout); - connect(leftArrow, SIGNAL(clicked()), SLOT(previousPage())); - connect(rightArrow, SIGNAL(clicked()), SLOT(nextPage())); + connect(upArrow, SIGNAL(clicked()), SLOT(previousPage())); + connect(downArrow, SIGNAL(clicked()), SLOT(nextPage())); QPalette pal = m_popupFrame->palette(); setAutoFillBackground(true); diff --git a/src/plugins/quickopen/quickopentoolwindow.cpp b/src/plugins/quickopen/quickopentoolwindow.cpp index ee36e46..eeb362e 100644 --- a/src/plugins/quickopen/quickopentoolwindow.cpp +++ b/src/plugins/quickopen/quickopentoolwindow.cpp @@ -238,7 +238,7 @@ void CompletionList::updatePreferredSize() preferredWidth = width(); #endif - m_preferredSize = QSize(600, //qMax(600, preferredWidth), + m_preferredSize = QSize(800, //qMax(600, preferredWidth), shint.height() * 17 + frameWidth() * 2); //header()->setStretchLastSection(true); } @@ -283,7 +283,7 @@ QuickOpenToolWindow::QuickOpenToolWindow(QuickOpenPlugin *qop) : this->installEventFilter(this); m_completionList->setModel(m_quickOpenModel); - m_completionList->header()->resizeSection(0, 300); + m_completionList->header()->resizeSection(0, 400); m_completionList->updatePreferredSize(); m_completionList->resize(m_completionList->preferredSize()); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index ada99dc..ccba3a2 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2300,8 +2300,8 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) if (drawBox || drawDown || drawUp) { painter.setRenderHint(QPainter::Antialiasing, true); painter.translate(.5, .5); - painter.setPen(pal.text().color()); - painter.setBrush(pal.text().color()); + painter.setPen(pal.toolTipText().color()); + painter.setBrush(Qt::lightGray); if (drawBox) { QPointF points1[3] = { QPointF(r.left(), r.center().y()-1), -- 1.6.0.6
_______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
