diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/python/utils/layout.py | 2 | ||||
-rw-r--r-- | src/main/python/utils/toolbar.py | 6 | ||||
-rw-r--r-- | src/main/resources/base/app.qss | 38 |
3 files changed, 31 insertions, 15 deletions
diff --git a/src/main/python/utils/layout.py b/src/main/python/utils/layout.py index ac37358..b977a68 100644 --- a/src/main/python/utils/layout.py +++ b/src/main/python/utils/layout.py @@ -72,7 +72,7 @@ class flowLayout(QLayout): spaceX = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ToolButton, QSizePolicy.ToolButton, Qt.Horizontal) spaceY = self.spacing() + wid.style().layoutSpacing(QSizePolicy.ToolButton, QSizePolicy.ToolButton, Qt.Vertical) nextX = x + item.sizeHint().width() + spaceX - if nextX - spaceX > rect.right() and lineHeight > 0: + if nextX + spaceX > rect.right() and lineHeight > 0: x = rect.x() y = y + lineHeight + spaceY nextX = x + item.sizeHint().width() + spaceX diff --git a/src/main/python/utils/toolbar.py b/src/main/python/utils/toolbar.py index 220504b..a175aff 100644 --- a/src/main/python/utils/toolbar.py +++ b/src/main/python/utils/toolbar.py @@ -28,8 +28,9 @@ class toolbar(QDockWidget): self.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea | Qt.NoDockWidgetArea) #declare main widget and layout self.widget = QWidget(self) + self.widget.setObjectName("ToolbarWidget") self.layout = QBoxLayout(QBoxLayout.TopToBottom, self.widget) - self.setAllowedAreas(Qt.AllDockWidgetAreas) + self.setWindowFlags(Qt.FramelessWindowHint) self.searchBox = QLineEdit(self.widget) #search box to search through componenets @@ -44,10 +45,11 @@ class toolbar(QDockWidget): self.diagArea.setWidgetResizable(True) self.layout.addWidget(self.diagArea, stretch=1) self.diagAreaWidget = QWidget(self.diagArea) #inner widget for scroll area + self.diagAreaWidget.setObjectName("ToolbarScrollWidget") #custom layout for inner widget self.diagAreaLayout = flowLayout(self.diagAreaWidget) self.diagAreaLayout.setSizeConstraint(flowLayout.SetMinimumSize) - self.setWidget(self.widget) #set main widget to dockwidget + self.setWidget(self.widget) #set main widget to dockwidget def clearLayout(self): # used to clear all items from toolbar, by parenting it to the toolbar instead diff --git a/src/main/resources/base/app.qss b/src/main/resources/base/app.qss index 723bfa3..00d8c1c 100644 --- a/src/main/resources/base/app.qss +++ b/src/main/resources/base/app.qss @@ -15,11 +15,6 @@ QLineEdit { QLineEdit:focus{ border-color: #7cabf9; } - -QFrame{ - background-color: white; -} - QTabBar { qproperty-drawBase: 0; left: 5px; @@ -91,13 +86,27 @@ QTabBar::tab:bottom:only-one { border: 1px solid #1b3774; border-radius: 6px; } - -QDockWidget { +fileWindow { + border-width: 2px; + outline: 0; color: white; background-color: white; - border: 1px solid #e6e6e6; +} +fileWindow::title{ + color: black; + border-width: 0px; + text-align: center; + background-color: white; } +QMainWindow { + background-color: white; +} + +QDockWidget#Toolbar{ + background-color: white; + border: 1px solid #e6e6e6; +} QDockWidget::float-button { border: 1px transparent #e6e6e6; border-radius: 2px; @@ -123,6 +132,10 @@ QScrollArea{ border-width: 0px; } +QWidget#ToolbarScrollWidget { + background-color: white; +} + QToolButton { color: #f2f2f2; text-align: center; @@ -155,17 +168,18 @@ QToolButton:checked { } sectionLabel{ - border-color: gray; + border-color: #BBD0E9; border-style: solid; - border-width: 0px 0px 1px 0px; + border-width: 0px 0px 2px 0px; padding-bottom: 3px; margin-bottom: 3px; margin-top: 10px; text-align: left; font-size: 20px; + color: gray; } -sectionLabel:first-child{ +sectionLabel:first{ margin-top: 0px; } @@ -200,4 +214,4 @@ customTabWidget::pane { border-radius: 7px; padding: 1px; background-color: #E6E6E3; -}
\ No newline at end of file +} |