Commit 0d04949d authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Removed the gray border around the open editors widget

It looks wrong when a shadow is added, which a lot of window managers do
these days. Whether is looks better when no shadow is added by the
window manager is debatable.

Reviewed-by: Jens Bache-Wiig
parent e0782185
......@@ -45,9 +45,8 @@ Q_DECLARE_METATYPE(Core::IFile *)
using namespace Core;
using namespace Core::Internal;
const int OpenEditorsWindow::WIDTH = 300;
const int OpenEditorsWindow::HEIGHT = 200;
const int OpenEditorsWindow::MARGIN = 4;
const int WIDTH = 300;
const int HEIGHT = 200;
OpenEditorsWindow::OpenEditorsWindow(QWidget *parent) :
QWidget(parent, Qt::Popup),
......@@ -64,7 +63,7 @@ OpenEditorsWindow::OpenEditorsWindow(QWidget *parent) :
m_editorList->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
#endif
m_editorList->installEventFilter(this);
m_editorList->setGeometry(MARGIN, MARGIN, WIDTH-2*MARGIN, HEIGHT-2*MARGIN);
m_editorList->setGeometry(0, 0, WIDTH, HEIGHT);
connect(m_editorList, SIGNAL(itemClicked(QTreeWidgetItem*, int)),
this, SLOT(editorClicked(QTreeWidgetItem*)));
......@@ -90,7 +89,7 @@ bool OpenEditorsWindow::isCentering()
QRect rect0 = m_editorList->visualItemRect(m_editorList->topLevelItem(0));
QRect rect1 = m_editorList->visualItemRect(m_editorList->topLevelItem(m_editorList->topLevelItemCount()-1));
int height = rect1.y() + rect1.height() - rect0.y();
height += 2*internalMargin + 2*MARGIN;
height += 2 * internalMargin;
if (height > HEIGHT)
return true;
return false;
......
......@@ -73,10 +73,6 @@ private slots:
void selectEditor(QTreeWidgetItem *item);
private:
static const int WIDTH;
static const int HEIGHT;
static const int MARGIN;
static void updateItem(QTreeWidgetItem *item, IEditor *editor);
void ensureCurrentVisible();
bool isCentering();
......
......@@ -39,7 +39,6 @@
using namespace Help::Internal;
const int gMargin = 4;
const int gWidth = 300;
const int gHeight = 200;
......@@ -53,8 +52,7 @@ OpenPagesSwitcher::OpenPagesSwitcher(OpenPagesModel *model)
m_openPagesWidget->allowContextMenu(false);
m_openPagesWidget->installEventFilter(this);
m_openPagesWidget->setGeometry(gMargin, gMargin, gWidth - 2 * gMargin,
gHeight - 2 * gMargin);
m_openPagesWidget->setGeometry(0, 0, gWidth, gHeight);
connect(m_openPagesWidget, SIGNAL(closePage(QModelIndex)), this,
SIGNAL(closePage(QModelIndex)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment