mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 10:36:42 +00:00
Tweak the look of the recordfilterbox. Keep titlebar if floating.
This commit is contained in:
parent
ffae816aab
commit
d41230a0c5
2 changed files with 10 additions and 15 deletions
|
@ -322,8 +322,11 @@ void CSVDoc::View::updateSubViewIndicies(SubView *view)
|
||||||
|
|
||||||
if(mSubViews.size() == 1)
|
if(mSubViews.size() == 1)
|
||||||
{
|
{
|
||||||
mSubViews.at(0)->setTitleBarWidget(new QWidget(this));
|
if(!mSubViews.at(0)->isFloating())
|
||||||
updateTitle(mSubViews.at(0)->getUniversalId().getTypeName().c_str());
|
{
|
||||||
|
mSubViews.at(0)->setTitleBarWidget(new QWidget(this));
|
||||||
|
updateTitle(mSubViews.at(0)->getUniversalId().getTypeName().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -471,7 +474,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
if(std::find(referenceables.begin(), referenceables.end(), id.getType()) != referenceables.end())
|
if(std::find(referenceables.begin(), referenceables.end(), id.getType()) != referenceables.end())
|
||||||
{
|
{
|
||||||
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||||
} else
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
view = mSubViewFactory.makeSubView (id, *mDocument);
|
view = mSubViewFactory.makeSubView (id, *mDocument);
|
||||||
}
|
}
|
||||||
|
@ -488,17 +492,6 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
userSettings.setDefinitions("SubView/minimum width", (QStringList() << QString(minWidth)));
|
userSettings.setDefinitions("SubView/minimum width", (QStringList() << QString(minWidth)));
|
||||||
view->setMinimumWidth(minWidth);
|
view->setMinimumWidth(minWidth);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if(mSubViews.size() == 1) // remove subview title and add to the main window
|
|
||||||
{
|
|
||||||
updateTitle(id.getTypeName().c_str());
|
|
||||||
// FIXME: search area broken
|
|
||||||
view->setTitleBarWidget(new QWidget(this));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
updateSubViewIndicies();
|
|
||||||
|
|
||||||
view->setStatusBar (mShowStatusBar->isChecked());
|
view->setStatusBar (mShowStatusBar->isChecked());
|
||||||
// NOTE: only required if show status bar setting should be applied to existing
|
// NOTE: only required if show status bar setting should be applied to existing
|
||||||
// window
|
// window
|
||||||
|
@ -511,6 +504,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||||
|
|
||||||
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
||||||
|
|
||||||
|
updateSubViewIndicies();
|
||||||
|
|
||||||
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
|
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
|
||||||
SLOT (addSubView (const CSMWorld::UniversalId&, const std::string&)));
|
SLOT (addSubView (const CSMWorld::UniversalId&, const std::string&)));
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ CSVFilter::RecordFilterBox::RecordFilterBox (CSMWorld::Data& data, QWidget *pare
|
||||||
{
|
{
|
||||||
QHBoxLayout *layout = new QHBoxLayout (this);
|
QHBoxLayout *layout = new QHBoxLayout (this);
|
||||||
|
|
||||||
layout->setContentsMargins (0, 0, 0, 0);
|
layout->setContentsMargins (0, 6, 5, 0);
|
||||||
|
|
||||||
QLabel *label = new QLabel("Record Filter", this);
|
QLabel *label = new QLabel("Record Filter", this);
|
||||||
label->setIndent(2);
|
label->setIndent(2);
|
||||||
|
|
Loading…
Reference in a new issue