Permalink
Browse files

Use separate Layout for Placeholder in the QuickLaunch.

  • Loading branch information...
1 parent 6887d12 commit bd5abe53167ea49bc4da16e5415c851f425e1a5c @SokoloffA SokoloffA committed Mar 13, 2013
Showing with 5 additions and 4 deletions.
  1. +5 −4 razorqt-panel/plugin-quicklaunch/razorquicklaunch.cpp
@@ -55,8 +55,11 @@ RazorQuickLaunch::RazorQuickLaunch(IRazorPanelPlugin *plugin, QWidget* parent) :
{
setAcceptDrops(true);
+ QHBoxLayout *layout = new QHBoxLayout(this);
+ setLayout(layout);
+
mLayout = new RazorGridLayout(this);
- setLayout(mLayout);
+ layout->addLayout(mLayout);
QSettings *settings = mPlugin->settings();
int count = settings->beginReadArray("apps");
@@ -141,7 +144,6 @@ void RazorQuickLaunch::realign()
void RazorQuickLaunch::addButton(QuickLaunchAction* action)
{
- mLayout->setEnabled(false);
QuickLaunchButton* btn = new QuickLaunchButton(action, this);
mLayout->addWidget(btn);
@@ -152,7 +154,6 @@ void RazorQuickLaunch::addButton(QuickLaunchAction* action)
delete mPlaceHolder;
mPlaceHolder = 0;
- mLayout->setEnabled(true);
}
void RazorQuickLaunch::dragEnterEvent(QDragEnterEvent *e)
@@ -307,5 +308,5 @@ void RazorQuickLaunch::showPlaceHolder()
mPlaceHolder->setText(tr("Drop application\nicons here"));
}
- mLayout->addWidget(mPlaceHolder);
+ layout()->addWidget(mPlaceHolder);
}

0 comments on commit bd5abe5

Please sign in to comment.