Skip to content
Snippets Groups Projects
Commit 1b2122f6 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm style settings from GUI::Style

parent 21f55e02
No related branches found
No related tags found
1 merge request!2075various little corrections
......@@ -42,39 +42,6 @@ QSize DefaultSizeOfLetterM()
} // namespace
void GUI::Style::setPropertyStyle(QTreeView* tree)
{
ASSERT(tree);
tree->setStyleSheet(GUI::Style::propertyTreeStyle());
tree->setAlternatingRowColors(true);
}
QString GUI::Style::propertyTreeStyle()
{
QString result;
// lines arount cell content
result += "QTreeView::item {"
" border-bottom: 1px solid #c7c8c9; "
" border-right: 1px solid #c7c8c9;}"
"QTreeView::branch {border-bottom: 1px solid #c7c8c9;}";
// styling of branch to restore open/closed signs eliminated by previous styling
result += "QTreeView::branch:has-children:!has-siblings:closed,"
"QTreeView::branch:closed:has-children:has-siblings {"
"padding:2px 2px 2px 2px;border-image: none;"
"image: url(:/images/caret-right.svg);}"
"QTreeView::branch:open:has-children:!has-siblings,"
"QTreeView::branch:open:has-children:has-siblings {"
"padding:2px 2px 2px 2px;border-image: none; image: url(:/images/caret-down.svg);"
"}";
// background of selected rows restored
result += "QTreeView::item:selected{background:#3daee9;}";
return result;
}
QFont GUI::Style::sectionFont(bool bold)
{
QFont result;
......
......@@ -18,19 +18,12 @@
#include <QFont>
#include <QString>
class QTreeView;
class QWidget;
class QLayout;
class QTreeView;
class QWidget;
namespace GUI::Style {
//! Sets style for the tree to use in property editors.
void setPropertyStyle(QTreeView* tree);
//! Returns string representing the style of QTreeView intended for property editor.
QString propertyTreeStyle();
//! Returns font for sections.
QFont sectionFont(bool bold = false);
......
......@@ -19,7 +19,6 @@
#include "GUI/Model/Data/DataItem.h"
#include "GUI/Model/Device/RealItem.h"
#include "GUI/Model/Model/RealTreeModel.h"
#include "GUI/Support/Util/Style.h"
#include "GUI/View/Import/Legacy1dDialog.h"
#include "GUI/View/Import/RealDataPropertiesWidget.h"
#include "GUI/View/Info/MessageBox.h"
......@@ -108,7 +107,6 @@ RealDataSelectorWidget::RealDataSelectorWidget(QWidget* parent, ProjectDocument*
m_itemTree->setHeaderHidden(true);
m_itemTree->setContextMenuPolicy(Qt::CustomContextMenu);
m_itemTree->setModel(m_treeModel);
GUI::Style::setPropertyStyle(m_itemTree);
auto* splitter = new QSplitter;
splitter->setOrientation(Qt::Vertical);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment