mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-22 12:39:59 +00:00
Tweak the look of the recordfilterbox. Keep titlebar if floating.
This commit is contained in:
parent
ffae816aab
commit
d41230a0c5
@ -321,10 +321,13 @@ void CSVDoc::View::updateSubViewIndicies(SubView *view)
|
||||
mSubViews.removeOne(view);
|
||||
|
||||
if(mSubViews.size() == 1)
|
||||
{
|
||||
if(!mSubViews.at(0)->isFloating())
|
||||
{
|
||||
mSubViews.at(0)->setTitleBarWidget(new QWidget(this));
|
||||
updateTitle(mSubViews.at(0)->getUniversalId().getTypeName().c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
updateTitle();
|
||||
@ -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())
|
||||
{
|
||||
view = mSubViewFactory.makeSubView (CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Referenceable, id.getId()), *mDocument);
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
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)));
|
||||
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());
|
||||
// NOTE: only required if show status bar setting should be applied to existing
|
||||
// window
|
||||
@ -511,6 +504,8 @@ void CSVDoc::View::addSubView (const CSMWorld::UniversalId& id, const std::strin
|
||||
|
||||
mSubViewWindow.addDockWidget (Qt::TopDockWidgetArea, view);
|
||||
|
||||
updateSubViewIndicies();
|
||||
|
||||
connect (view, SIGNAL (focusId (const CSMWorld::UniversalId&, const std::string&)), this,
|
||||
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);
|
||||
|
||||
layout->setContentsMargins (0, 0, 0, 0);
|
||||
layout->setContentsMargins (0, 6, 5, 0);
|
||||
|
||||
QLabel *label = new QLabel("Record Filter", this);
|
||||
label->setIndent(2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user