Replace shadow with border in headerbar in simulation view

CURA-8202
This commit is contained in:
Konstantinos Karmas 2021-07-01 11:55:24 +02:00
parent 0472df3814
commit bf40ccc3f2
2 changed files with 9 additions and 19 deletions

View file

@ -35,26 +35,21 @@ Item
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 2 * UM.Theme.getSize("wide_margin").width width: parent.width - 2 * UM.Theme.getSize("wide_margin").width
height: parent.height height: parent.height
// This is a trick to make sure that the borders of the two adjacent buttons' borders overlap. Otherwise
// there will be double border (one from each button)
spacing: -UM.Theme.getSize("default_lining").width
Cura.ViewsSelector Cura.ViewsSelector
{ {
id: viewsSelector id: viewsSelector
height: parent.height height: parent.height
width: UM.Theme.getSize("views_selector").width width: UM.Theme.getSize("views_selector").width
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
headerCornerSide: Cura.RoundedRectangle.Direction.Left headerCornerSide: Cura.RoundedRectangle.Direction.Left
} }
// Separator line
Rectangle
{
height: parent.height
// If there is no viewPanel, we only need a single spacer, so hide this one.
visible: viewPanel.source != ""
width: visible ? UM.Theme.getSize("default_lining").width : 0
color: UM.Theme.getColor("lining")
}
// This component will grow freely up to complete the width of the row. // This component will grow freely up to complete the width of the row.
Loader Loader
{ {
@ -64,14 +59,6 @@ Item
source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : "" source: UM.Controller.activeView != null && UM.Controller.activeView.stageMenuComponent != null ? UM.Controller.activeView.stageMenuComponent : ""
} }
// Separator line
Rectangle
{
height: parent.height
width: UM.Theme.getSize("default_lining").width
color: UM.Theme.getColor("lining")
}
Item Item
{ {
id: printSetupSelectorItem id: printSetupSelectorItem

View file

@ -16,6 +16,9 @@ Cura.ExpandableComponent
id: base id: base
dragPreferencesNamePrefix: "view/colorscheme" dragPreferencesNamePrefix: "view/colorscheme"
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining")
enableHeaderShadow: false
contentHeaderTitle: catalog.i18nc("@label", "Color scheme") contentHeaderTitle: catalog.i18nc("@label", "Color scheme")