Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Move viewer toolbar to the right and use defined primary color for highlighting

Henriette Dinger5b6ea2fba771
diff --git a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
index 10af91e3209..067d82df9d7 100644
--- a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
+++ b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/generic.sass
@@ -1,4 +1,6 @@
// -------------------------- GENERIC --------------------------
+@import "openproject/variables"
+@import "openproject/mixins"
// The IFC viewer shall fill the viewport to the bottom.
// This is different to how we style #content else where.
@@ -15,14 +17,13 @@
position: relative
width: 100%
height: 100%
- border-top: 1px solid gray
- border-bottom: 1px solid gray
+ border-top: 1px solid $gray-dark
+ border-bottom: 1px solid $gray-dark
.ifc-model-viewer--model-canvas
width: 100%
height: 100%
- background: #ebebeb
-
+ background: $gray-lighter
.ifc-model-viewer--nav-cube-canvas
position: absolute
@@ -30,7 +31,7 @@
height: 200px
bottom: 0
right: 0
- z-index: 200000
+ z-index: 2000
.ifc-model-viewer--section-planes-overview-canvas
position: absolute
@@ -38,37 +39,25 @@
height: 250px
top: 300px
right: 50px
- z-index: 200000
+ z-index: 2000
// -------------------------- BUTTONS --------------------------
.xeokit-btn-group
- position: relative
- display: inline-flex
vertical-align: middle
- margin-right: .7rem !important
+ margin-right: .5rem
.xeokit-btn
- position: relative
- flex: 1 1 auto
- color: #007bff
- background-color: transparent
- text-align: center
+ background-color: $button--background-color
vertical-align: middle
- border: 1px solid #007bff
padding: .375rem .75rem
border-radius: .25rem
- transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out
- -webkit-appearance: button
- overflow: visible
- margin: 0
- box-sizing: border-box
- align-items: flex-start
+ @include default-transition
&.disabled
opacity: .55
&.active
- color: #fff
- background-color: #007bff
- border-color: #007bff
\ No newline at end of file
+ @include varprop(color, font-color-on-primary)
+ @include varprop(background-color, primary-color)
+ @include varprop(border-color, primary-color)
diff --git a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/toolbar.sass b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/toolbar.sass
index bc60b30a4d8..4d1019ac8d1 100644
--- a/modules/ifc_models/app/assets/stylesheets/ifc_viewer/toolbar.sass
+++ b/modules/ifc_models/app/assets/stylesheets/ifc_viewer/toolbar.sass
@@ -2,12 +2,9 @@
// -------------------------- GENERIC --------------------------
.ifc-model-viewer--toolbar-container
- position: fixed
+ position: absolute
width: 100%
- align-items: center
- justify-content: center
padding: 6px
- height: 60px
// Use our own icon font instead of including Xeokit's FontAwesome
button[class^="fa-"],
@@ -16,16 +13,22 @@
font-family: "openproject-icon-font" !important
.fa-home::before
@include icon-mixin-home
+ .fa-crop::before
+ @include icon-mixin-zoom-auto
+ .fa-male::before
+ @include icon-mixin-user
.fa-info-circle::before
@include icon-mixin-info2
.fa-cut::before
@include icon-mixin-cut
.fa-cube::before
@include icon-mixin-modules
+ .fa-eraser::before
+ @include icon-mixin-rubber
// -------------------------- XEOKIT specific --------------------------
.xeokit-toolbar
display: flex
flex-wrap: wrap
- justify-content: flex-start
\ No newline at end of file
+ justify-content: flex-end