Cura/resources/qml/PrintSetupSelector/PrintSetupSelector.qml
Konstantinos Karmas 294b67f72f Replace the shadow of the PrepareMenu with a border
In order for that to be possible, the background border of the ExpandablePopup and the ExpandableComponent had to be exposed.

In addition, since in the `RowLayout` the `ConfigurationMenu` and the `MachineSelector` both draw a border around them, it means that there will be a double "divider" (one border line from each button). To overcome that, we set the spacing of the `RowLayout` as a `- border_width`, which ensures then that there will be only a single line of border between the two adjacent buttons.

CURA-8013
2021-06-28 17:50:38 +02:00

41 lines
1.2 KiB
QML

// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 2.0
import UM 1.3 as UM
import Cura 1.0 as Cura
Cura.ExpandableComponent
{
id: printSetupSelector
dragPreferencesNamePrefix: "view/settings"
property bool preSlicedData: PrintInformation !== null && PrintInformation.preSliced
contentPadding: UM.Theme.getSize("default_lining").width
contentHeaderTitle: catalog.i18nc("@label", "Print settings")
enableHeaderShadow: false
headerBackgroundBorder.width: UM.Theme.getSize("default_lining").width
headerBackgroundBorder.color: UM.Theme.getColor("lining")
enabled: !preSlicedData
disabledText: catalog.i18nc("@label shown when we load a Gcode file", "Print setup disabled. G-code file can not be modified.")
UM.I18nCatalog
{
id: catalog
name: "cura"
}
headerItem: PrintSetupSelectorHeader {}
property var extrudersModel: CuraApplication.getExtrudersModel()
contentItem: PrintSetupSelectorContents {}
onExpandedChanged: UM.Preferences.setValue("view/settings_visible", expanded)
Component.onCompleted: expanded = UM.Preferences.getValue("view/settings_visible")
}