mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-02 07:11:22 -07:00
Merge branch 'master' into feature_setting_visibility_profiles
# Conflicts: # resources/qml/Settings/SettingView.qml
This commit is contained in:
commit
a17160f52d
129 changed files with 1937 additions and 1538 deletions
|
|
@ -187,13 +187,13 @@ Button
|
|||
id: settingsButton
|
||||
|
||||
visible: base.hovered || settingsButton.hovered
|
||||
height: base.height * 0.6
|
||||
width: base.height * 0.6
|
||||
height: Math.round(base.height * 0.6)
|
||||
width: Math.round(base.height * 0.6)
|
||||
|
||||
anchors {
|
||||
right: inheritButton.visible ? inheritButton.left : parent.right
|
||||
// use 1.9 as the factor because there is a 0.1 difference between the settings and inheritance warning icons
|
||||
rightMargin: inheritButton.visible ? UM.Theme.getSize("default_margin").width / 2 : category_arrow.width + UM.Theme.getSize("default_margin").width * 1.9
|
||||
rightMargin: inheritButton.visible ? Math.round(UM.Theme.getSize("default_margin").width / 2) : category_arrow.width + Math.round(UM.Theme.getSize("default_margin").width * 1.9)
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ Button
|
|||
return false
|
||||
}
|
||||
|
||||
height: parent.height / 2
|
||||
height: Math.round(parent.height / 2)
|
||||
width: height
|
||||
|
||||
onClicked:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2015 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Uranium is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import UM 1.2 as UM
|
||||
|
||||
|
|
@ -118,8 +118,8 @@ SettingItem
|
|||
UM.RecolorImage {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
width: parent.width / 2.5
|
||||
height: parent.height / 2.5
|
||||
width: Math.round(parent.width / 2.5)
|
||||
height: Math.round(parent.height / 2.5)
|
||||
sourceSize.width: width
|
||||
sourceSize.height: width
|
||||
color: !enabled ? UM.Theme.getColor("setting_control_disabled_text") : UM.Theme.getColor("setting_control_text");
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ SettingItem
|
|||
{
|
||||
id: downArrow
|
||||
x: control.width - width - control.rightPadding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||
|
||||
source: UM.Theme.getIcon("arrow_bottom")
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ SettingItem
|
|||
{
|
||||
id: downArrow
|
||||
x: control.width - width - control.rightPadding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||
|
||||
source: UM.Theme.getIcon("arrow_bottom")
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
|
|
@ -126,16 +126,16 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
id: swatch
|
||||
height: UM.Theme.getSize("setting_control").height / 2
|
||||
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||
width: height
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width / 4
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||
radius: width / 2
|
||||
radius: Math.round(width / 2)
|
||||
|
||||
color: control.color
|
||||
}
|
||||
|
|
@ -180,16 +180,16 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
id: swatch
|
||||
height: UM.Theme.getSize("setting_control").height / 2
|
||||
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||
width: height
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width / 4
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||
radius: width / 2
|
||||
radius: Math.round(width / 2)
|
||||
|
||||
color: control.model.getItem(index).color
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
// Copyright (c) 2017 Ultimaker B.V.
|
||||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick 2.8
|
||||
import QtQuick.Layouts 1.2
|
||||
import QtQuick.Controls 2.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
|
@ -108,7 +108,7 @@ Item {
|
|||
id: label;
|
||||
|
||||
anchors.left: parent.left;
|
||||
anchors.leftMargin: doDepthIndentation ? (UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width) : 0
|
||||
anchors.leftMargin: doDepthIndentation ? Math.round((UM.Theme.getSize("section_icon_column").width + 5) + ((definition.depth - 1) * UM.Theme.getSize("setting_control_depth_margin").width)) : 0
|
||||
anchors.right: settingControls.left;
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
|
|
@ -128,12 +128,12 @@ Item {
|
|||
{
|
||||
id: settingControls
|
||||
|
||||
height: parent.height / 2
|
||||
spacing: UM.Theme.getSize("sidebar_margin").height / 2
|
||||
height: Math.round(parent.height / 2)
|
||||
spacing: Math.round(UM.Theme.getSize("sidebar_margin").height / 2)
|
||||
|
||||
anchors {
|
||||
right: controlContainer.left
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width / 2
|
||||
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width / 2)
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ SettingItem
|
|||
{
|
||||
id: downArrow
|
||||
x: control.width - width - control.rightPadding
|
||||
y: control.topPadding + (control.availableHeight - height) / 2
|
||||
y: control.topPadding + Math.round((control.availableHeight - height) / 2)
|
||||
|
||||
source: UM.Theme.getIcon("arrow_bottom")
|
||||
width: UM.Theme.getSize("standard_arrow").width
|
||||
|
|
@ -145,16 +145,16 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
id: swatch
|
||||
height: UM.Theme.getSize("setting_control").height / 2
|
||||
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||
width: height
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width / 4
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||
radius: width / 2
|
||||
radius: Math.round(width / 2)
|
||||
|
||||
color: control.color
|
||||
}
|
||||
|
|
@ -199,16 +199,16 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
id: swatch
|
||||
height: UM.Theme.getSize("setting_control").height / 2
|
||||
height: Math.round(UM.Theme.getSize("setting_control").height / 2)
|
||||
width: height
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.margins: UM.Theme.getSize("default_margin").width / 4
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_margin").width / 4)
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.color: enabled ? UM.Theme.getColor("setting_control_border") : UM.Theme.getColor("setting_control_disabled_border")
|
||||
radius: width / 2
|
||||
radius: Math.round(width / 2)
|
||||
|
||||
color: control.model.getItem(index).color
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ SettingItem
|
|||
|
||||
anchors.fill: parent
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.width: Math.round(UM.Theme.getSize("default_lining").width)
|
||||
border.color:
|
||||
{
|
||||
if(!enabled)
|
||||
|
|
@ -76,7 +76,7 @@ SettingItem
|
|||
Rectangle
|
||||
{
|
||||
anchors.fill: parent;
|
||||
anchors.margins: UM.Theme.getSize("default_lining").width;
|
||||
anchors.margins: Math.round(UM.Theme.getSize("default_lining").width);
|
||||
color: UM.Theme.getColor("setting_control_highlight")
|
||||
opacity: !control.hovered ? 0 : propertyProvider.properties.validationState == "ValidatorState.Valid" ? 1.0 : 0.35;
|
||||
}
|
||||
|
|
@ -84,7 +84,7 @@ SettingItem
|
|||
Label
|
||||
{
|
||||
anchors.right: parent.right;
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
anchors.rightMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||
anchors.verticalCenter: parent.verticalCenter;
|
||||
|
||||
text: definition.unit;
|
||||
|
|
@ -107,9 +107,9 @@ SettingItem
|
|||
anchors
|
||||
{
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
leftMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("setting_unit_margin").width
|
||||
rightMargin: Math.round(UM.Theme.getSize("setting_unit_margin").width)
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
renderType: Text.NativeRendering
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
import QtQuick.Layouts 1.2
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
|
@ -32,16 +32,16 @@ Item
|
|||
{
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
leftMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
leftMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||
right: parent.right
|
||||
rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||
}
|
||||
|
||||
Label
|
||||
{
|
||||
id: globalProfileLabel
|
||||
text: catalog.i18nc("@label","Profile:");
|
||||
width: Math.floor(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
|
||||
width: Math.round(parent.width * 0.45 - UM.Theme.getSize("sidebar_margin").width - 2)
|
||||
font: UM.Theme.getFont("default");
|
||||
color: UM.Theme.getColor("text");
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
@ -55,7 +55,7 @@ Item
|
|||
|
||||
text: generateActiveQualityText()
|
||||
enabled: !header.currentExtruderVisible || header.currentExtruderIndex > -1
|
||||
width: Math.floor(parent.width * 0.55)
|
||||
width: Math.round(parent.width * 0.55)
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
anchors.left: globalProfileLabel.right
|
||||
anchors.right: parent.right
|
||||
|
|
@ -84,12 +84,12 @@ Item
|
|||
id: customisedSettings
|
||||
|
||||
visible: Cura.MachineManager.hasUserSettings
|
||||
height: Math.floor(parent.height * 0.6)
|
||||
width: Math.floor(parent.height * 0.6)
|
||||
height: Math.round(parent.height * 0.6)
|
||||
width: Math.round(parent.height * 0.6)
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.rightMargin: Math.round(UM.Theme.getSize("setting_preferences_button_margin").width - UM.Theme.getSize("sidebar_margin").width)
|
||||
|
||||
color: hovered ? UM.Theme.getColor("setting_control_button_hover") : UM.Theme.getColor("setting_control_button");
|
||||
iconSource: UM.Theme.getIcon("star");
|
||||
|
|
@ -165,7 +165,7 @@ Item
|
|||
id: filterContainer
|
||||
visible: true
|
||||
|
||||
border.width: UM.Theme.getSize("default_lining").width
|
||||
border.width: Math.round(UM.Theme.getSize("default_lining").width)
|
||||
border.color:
|
||||
{
|
||||
if(hoverMouseArea.containsMouse || clearFilterButton.containsMouse)
|
||||
|
|
@ -198,7 +198,7 @@ Item
|
|||
|
||||
anchors.left: parent.left
|
||||
anchors.right: clearFilterButton.left
|
||||
anchors.rightMargin: UM.Theme.getSize("sidebar_margin").width
|
||||
anchors.rightMargin: Math.round(UM.Theme.getSize("sidebar_margin").width)
|
||||
|
||||
placeholderText: catalog.i18nc("@label:textbox", "Search...")
|
||||
|
||||
|
|
@ -269,7 +269,7 @@ Item
|
|||
iconSource: UM.Theme.getIcon("cross1")
|
||||
visible: findingSettings
|
||||
|
||||
height: parent.height * 0.4
|
||||
height: Math.round(parent.height * 0.4)
|
||||
width: visible ? height : 0
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -303,7 +303,7 @@ Item
|
|||
ListView
|
||||
{
|
||||
id: contents
|
||||
spacing: UM.Theme.getSize("default_lining").height;
|
||||
spacing: Math.round(UM.Theme.getSize("default_lining").height);
|
||||
cacheBuffer: 1000000; // Set a large cache to effectively just cache every list item.
|
||||
|
||||
model: UM.SettingDefinitionsModel
|
||||
|
|
@ -331,7 +331,7 @@ Item
|
|||
{
|
||||
id: delegate
|
||||
|
||||
width: UM.Theme.getSize("sidebar").width;
|
||||
width: Math.round(UM.Theme.getSize("sidebar").width);
|
||||
height: provider.properties.enabled == "True" ? UM.Theme.getSize("section").height : - contents.spacing
|
||||
Behavior on height { NumberAnimation { duration: 100 } }
|
||||
opacity: provider.properties.enabled == "True" ? 1 : 0
|
||||
|
|
@ -453,7 +453,7 @@ Item
|
|||
contextMenu.provider = provider
|
||||
contextMenu.popup();
|
||||
}
|
||||
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: delegate.height / 2 }, text)
|
||||
onShowTooltip: base.showTooltip(delegate, { x: -UM.Theme.getSize("default_arrow").width, y: Math.round(delegate.height / 2) }, text)
|
||||
onHideTooltip: base.hideTooltip()
|
||||
onShowAllHiddenInheritedSettings:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue