Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
1b2122f6
Commit
1b2122f6
authored
1 year ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm style settings from GUI::Style
parent
21f55e02
No related branches found
No related tags found
1 merge request
!2075
various little corrections
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Support/Util/Style.cpp
+0
-33
0 additions, 33 deletions
GUI/Support/Util/Style.cpp
GUI/Support/Util/Style.h
+1
-8
1 addition, 8 deletions
GUI/Support/Util/Style.h
GUI/View/Import/RealDataSelectorWidget.cpp
+0
-2
0 additions, 2 deletions
GUI/View/Import/RealDataSelectorWidget.cpp
with
1 addition
and
43 deletions
GUI/Support/Util/Style.cpp
+
0
−
33
View file @
1b2122f6
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
GUI/Support/Util/Style.h
+
1
−
8
View file @
1b2122f6
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
GUI/View/Import/RealDataSelectorWidget.cpp
+
0
−
2
View file @
1b2122f6
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment