ui: subwindow when resize mainwindow

* disable drop in qtlineedit
    fixes bug where when file is dropped in the lineedit with text,
    the the file will be added as text midst the existing text
* move message to start from script before layout loading so it will load right
(only when started without script on linux)
* center subwindow when mainwindow size changes
This commit is contained in:
Andreas Stallinger
2017-06-08 20:42:32 +02:00
parent 699de2ee0a
commit 419a2e27ba
8 changed files with 75 additions and 51 deletions
@@ -29,6 +29,7 @@ QtListItemWidget::QtListItemWidget(QtDirectoryListBox* list, QListWidgetItem* it
m_data->setAttribute(Qt::WA_MacShowFocusRect, 0);
m_data->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
m_data->setObjectName("field");
m_data->setAcceptDrops(false);
m_button = new QtIconButton(
(ResourcePaths::getGuiPath().str() + "window/dots.png").c_str(),
@@ -72,7 +73,7 @@ void QtListItemWidget::setText(QString text)
void QtListItemWidget::setFocus()
{
m_data->setFocus(Qt::OtherFocusReason);
m_data->setFocus(Qt::OtherFocusReason);
}
void QtListItemWidget::handleButtonPress()